}
private ResolvedMember[] filterInJavaVisible(ResolvedMember[] ms) {
- List l = new ArrayList();
+ List<ResolvedMember> l = new ArrayList<ResolvedMember>();
for (int i = 0, len = ms.length; i < len; i++) {
if (!ms[i].isAjSynthetic() && ms[i].getAssociatedShadowMunger() == null) {
l.add(ms[i]);
}
}
- return (ResolvedMember[]) l.toArray(new ResolvedMember[l.size()]);
+ return l.toArray(new ResolvedMember[l.size()]);
}
public abstract ISourceContext getSourceContext();
boolean itdProblem = false;
- for (Iterator iter = getInterTypeMungersIncludingSupers().iterator(); iter.hasNext();) {
- ConcreteTypeMunger munger = (ConcreteTypeMunger) iter.next();
- itdProblem = checkAbstractDeclaration(munger) || itdProblem; // Rule
- // 2
-
+ for (ConcreteTypeMunger munger : getInterTypeMungersIncludingSupers()) {
+ itdProblem = checkAbstractDeclaration(munger) || itdProblem; // Rule 2
}
if (itdProblem) {
return; // If the rules above are broken, return right now
}
- for (Iterator iter = getInterTypeMungersIncludingSupers().iterator(); iter.hasNext();) {
- ConcreteTypeMunger munger = (ConcreteTypeMunger) iter.next();
+ for (ConcreteTypeMunger munger : getInterTypeMungersIncludingSupers()) {
if (munger.getSignature() != null && munger.getSignature().isAbstract()) { // Rule 1
if (munger.getMunger().getKind() == ResolvedTypeMunger.MethodDelegate2) {
// ignore for @AJ ITD as munger.getSignature() is the
}
// now compare to existingMungers
- for (Iterator i = interTypeMungers.iterator(); i.hasNext();) {
- ConcreteTypeMunger existingMunger = (ConcreteTypeMunger) i.next();
+ for (Iterator<ConcreteTypeMunger> i = interTypeMungers.iterator(); i.hasNext();) {
+ ConcreteTypeMunger existingMunger = i.next();
if (conflictingSignature(existingMunger.getSignature(), munger.getSignature())) {
// System.err.println("match " + munger + " with " +
// existingMunger);
ResolvedType declaringRt = existingMember.getDeclaringType().resolve(world);
WeaverStateInfo wsi = declaringRt.getWeaverState();
if (wsi != null) {
- List mungersAffectingThisType = wsi.getTypeMungers(declaringRt);
+ List<ConcreteTypeMunger> mungersAffectingThisType = wsi.getTypeMungers(declaringRt);
if (mungersAffectingThisType != null) {
- for (Iterator iterator = mungersAffectingThisType.iterator(); iterator.hasNext()
- && !isDuplicateOfPreviousITD;) {
- ConcreteTypeMunger ctMunger = (ConcreteTypeMunger) iterator.next();
+ for (Iterator<ConcreteTypeMunger> iterator = mungersAffectingThisType.iterator(); iterator
+ .hasNext() && !isDuplicateOfPreviousITD;) {
+ ConcreteTypeMunger ctMunger = iterator.next();
// relatively crude check - is the ITD
// for the same as the existingmember
// and does it come
String aspectName = typeTransformer.getAspectType().getName();
ISourceLocation typeTransformerLocation = typeTransformer.getSourceLocation();
ISourceLocation existingMemberLocation = existingMember.getSourceLocation();
- IMessage errorMessage = null;
String msg = WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, aspectName,
existingMember);
}
// interTypeMungers.clear();
// BUG? Why can't this be clear() instead: 293620 c6
- interTypeMungers = new ArrayList();
+ interTypeMungers = new ArrayList<ConcreteTypeMunger>();
}
public boolean isTopmostImplementor(ResolvedType interfaceType) {
return this;
}
- public List getExposedPointcuts() {
+ public List<ResolvedMember> getExposedPointcuts() {
List<ResolvedMember> ret = new ArrayList<ResolvedMember>();
if (getSuperclass() != null) {
ret.addAll(getSuperclass().getExposedPointcuts());