protected ResolvedType concreteAspect; // null until after concretize
// Just for Cflow*entry kinds
- protected List innerCflowEntries = Collections.EMPTY_LIST;
+ protected List<ShadowMunger> innerCflowEntries = Collections.emptyList();
protected int nFreeVars;
protected TypePattern exceptionType; // just for Softener kind
public ISourceLocation lastReportedMonitorExitJoinpointLocation = null;
public static Advice makeCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, int nFreeVars,
- List innerCflowEntries, ResolvedType inAspect) {
+ List<ShadowMunger> innerCflowEntries, ResolvedType inAspect) {
Advice ret = world.createAdviceMunger(isBelow ? AdviceKind.CflowBelowEntry : AdviceKind.CflowEntry, entry, stackField, 0,
entry, inAspect);
ret.innerCflowEntries = innerCflowEntries;
}
public static Advice makePerCflowEntry(World world, Pointcut entry, boolean isBelow, Member stackField, ResolvedType inAspect,
- List innerCflowEntries) {
+ List<ShadowMunger> innerCflowEntries) {
Advice ret = world.createAdviceMunger(isBelow ? AdviceKind.PerCflowBelowEntry : AdviceKind.PerCflowEntry, entry,
stackField, 0, entry, inAspect);
ret.innerCflowEntries = innerCflowEntries;
ResolvedType adviceReturnGenericType = adviceReturnType.getGenericType(); // Set
if (shadowReturnGenericType.isAssignableFrom(adviceReturnGenericType)
&& world.getLint().uncheckedAdviceConversion.isEnabled()) {
- world.getLint().uncheckedAdviceConversion.signal(new String[] { shadow.toString(),
- shadowReturnType.getName(), adviceReturnType.getName() }, shadow.getSourceLocation(),
- new ISourceLocation[] { getSourceLocation() });
+ world.getLint().uncheckedAdviceConversion.signal(
+ new String[] { shadow.toString(), shadowReturnType.getName(), adviceReturnType.getName() },
+ shadow.getSourceLocation(), new ISourceLocation[] { getSourceLocation() });
}
} else if (!shadowReturnType.isAssignableFrom(adviceReturnType)) {
// System.err.println(this + ", " + sourceContext +
// ", " + start);
- world.showMessage(IMessage.ERROR, WeaverMessages
- .format(WeaverMessages.INCOMPATIBLE_RETURN_TYPE, shadow), getSourceLocation(), shadow
- .getSourceLocation());
+ world.showMessage(IMessage.ERROR,
+ WeaverMessages.format(WeaverMessages.INCOMPATIBLE_RETURN_TYPE, shadow), getSourceLocation(),
+ shadow.getSourceLocation());
return false;
}
}
lateTypeMungers.add(m);
}
- public void addDeclares(Collection c) {
- for (Iterator i = c.iterator(); i.hasNext();) {
- addDeclare((Declare) i.next());
+ public void addDeclares(Collection<Declare> declares) {
+ for (Declare declare : declares) {
+ addDeclare(declare);
}
}
}
}
- public void exposeTypes(Collection typesToExpose) {
- for (Iterator i = typesToExpose.iterator(); i.hasNext();) {
- exposeType((UnresolvedType) i.next());
+ public void exposeTypes(List<UnresolvedType> typesToExpose) {
+ for (UnresolvedType typeToExpose : typesToExpose) {
+ exposeType(typeToExpose);
}
}
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
* For generic types, this list holds references to all the derived raw and parameterized versions. We need this so that if the
* generic delegate is swapped during incremental compilation, the delegate of the derivatives is swapped also.
*/
- private final List/* ReferenceType */derivativeTypes = new ArrayList();
+ private final List<ReferenceType> derivativeTypes = new ArrayList<ReferenceType>();
/**
* For parameterized types (or the raw type) - this field points to the actual reference type from which they are derived.
if (other.isTypeVariableReference()) {
TypeVariableReferenceType otherType = (TypeVariableReferenceType) other;
if (this instanceof TypeVariableReference) {
- return ((TypeVariableReference) this).getTypeVariable().resolve(world).canBeBoundTo(
- otherType.getTypeVariable().getFirstBound().resolve(world));// pr171952
+ return ((TypeVariableReference) this).getTypeVariable().resolve(world)
+ .canBeBoundTo(otherType.getTypeVariable().getFirstBound().resolve(world));// pr171952
// return
// ((TypeVariableReference)this).getTypeVariable()==otherType
// .getTypeVariable();
return delegateInterfaces;
}
- private String toString(ResolvedType[] delegateInterfaces) {
- StringBuffer sb = new StringBuffer();
- if (delegateInterfaces != null) {
- for (ResolvedType rt : delegateInterfaces) {
- sb.append(rt).append(" ");
- }
- }
- return sb.toString();
- }
+ // private String toString(ResolvedType[] delegateInterfaces) {
+ // StringBuffer sb = new StringBuffer();
+ // if (delegateInterfaces != null) {
+ // for (ResolvedType rt : delegateInterfaces) {
+ // sb.append(rt).append(" ");
+ // }
+ // }
+ // return sb.toString();
+ // }
/**
* Locates the named type variable in the list of those on this generic type and returns the type parameter from the second list
* class Foo<T extends String,E extends Number> implements SuperInterface<T> {}
* </code> where <code>
* interface SuperInterface<Z> {}
- * </code> In that
- * example, a use of the 'Foo' raw type should know that it implements the SuperInterface<String>.
+ * </code> In that example, a use of the 'Foo' raw type should know that it implements the SuperInterface<String>.
*/
private UnresolvedType[] determineThoseTypesToUse(ResolvedType parameterizedInterface, UnresolvedType[] paramTypes) {
// What are the type parameters for the supertype?
public PerClause getPerClause() {
PerClause pclause = getDelegate().getPerClause();
if (isParameterizedType()) { // could cache the result here...
- Map parameterizationMap = getAjMemberParameterizationMap();
+ Map<String, UnresolvedType> parameterizationMap = getAjMemberParameterizationMap();
pclause = (PerClause) pclause.parameterizeWith(parameterizationMap, world);
}
return pclause;
// GENERICITDFIX
// // Map parameterizationMap = getAjMemberParameterizationMap();
- //
+ //
// // if (parameterizedTypeMungers != null) return parameterizedTypeMungers;
// Collection ret = null;
// if (ajMembersNeedParameterization()) {
// }
@Override
- public Collection getPrivilegedAccesses() {
+ public Collection<ResolvedMember> getPrivilegedAccesses() {
return getDelegate().getPrivilegedAccesses();
}
@Override
public ResolvedType getSuperclass() {
ResolvedType ret = null;// superclassReference.get();
- if (ret != null) {
- return ret;
- }
+ // if (ret != null) {
+ // return ret;
+ // }
if (newSuperclass != null) {
if (this.isParameterizedType() && newSuperclass.isParameterizedType()) {
return newSuperclass.parameterize(getMemberParameterizationMap()).resolve(getWorld());
((AbstractReferenceTypeDelegate) delegate).setSourceContext(this.delegate.getSourceContext());
}
this.delegate = delegate;
- for (Iterator it = this.derivativeTypes.iterator(); it.hasNext();) {
- ReferenceType dependent = (ReferenceType) it.next();
+ for (ReferenceType dependent : derivativeTypes) {
dependent.setDelegate(delegate);
}
// Declare dec = (Declare) i.next();
// if (!dec.isAdviceLike()) ret.add(dec);
// }
- //
+ //
// if (!includeAdviceLike) return ret;
if (!this.isAbstract()) {
ResolvedType onType = itdMember.getDeclaringType().resolve(world);
if (onType.isInterface() && itdMember.isAbstract() && !itdMember.isPublic()) {
world.getMessageHandler().handleMessage(
- new Message(WeaverMessages.format(WeaverMessages.ITD_ABSTRACT_MUST_BE_PUBLIC_ON_INTERFACE, munger
- .getSignature(), onType), "", Message.ERROR, getSourceLocation(), null,
+ new Message(WeaverMessages.format(WeaverMessages.ITD_ABSTRACT_MUST_BE_PUBLIC_ON_INTERFACE,
+ munger.getSignature(), onType), "", Message.ERROR, getSourceLocation(), null,
new ISourceLocation[] { getMungerLocation(munger) }));
return true;
}
if (onType == null) {
// The target is not generic
getWorld().getMessageHandler().handleMessage(
- MessageUtil.error("The target type for the intertype declaration is not generic", munger
- .getSourceLocation()));
+ MessageUtil.error("The target type for the intertype declaration is not generic",
+ munger.getSourceLocation()));
return munger;
}
member.resolve(world); // Ensure all parts of the member are resolved
if (existing.getSignature().getName().equals(thisRealMungerSignatureName)
&& existing.version == NewFieldTypeMunger.VersionTwo
// this check ensures no problem for a clash with an ITD on an interface
- && existing.getSignature().getDeclaringType().equals(
- newFieldTypeMunger.getSignature().getDeclaringType())) {
+ && existing.getSignature().getDeclaringType()
+ .equals(newFieldTypeMunger.getSignature().getDeclaringType())) {
// report error on the aspect
StringBuffer sb = new StringBuffer();
- sb
- .append("Cannot handle two aspects both attempting to use new style ITDs for the same named field ");
- sb
- .append("on the same target type. Please recompile at least one aspect with '-Xset:itdVersion=1'.");
+ sb.append("Cannot handle two aspects both attempting to use new style ITDs for the same named field ");
+ sb.append("on the same target type. Please recompile at least one aspect with '-Xset:itdVersion=1'.");
sb.append(" Aspects involved: " + munger.getAspectType().getName() + " and "
+ typeMunger.getAspectType().getName() + ".");
sb.append(" Field is named '" + existing.getSignature().getName() + "'");
}
}
- world.showMessage(Message.ERROR, WeaverMessages.format(WeaverMessages.CANT_OVERRIDE_FINAL_MEMBER, parent), child
- .getSourceLocation(), null);
+ world.showMessage(Message.ERROR, WeaverMessages.format(WeaverMessages.CANT_OVERRIDE_FINAL_MEMBER, parent),
+ child.getSourceLocation(), null);
return false;
}
}
if (incompatibleReturnTypes) {
- world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_RETURN_TYPE_MISMATCH, parent, child), child
- .getSourceLocation(), parent.getSourceLocation());
+ world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_RETURN_TYPE_MISMATCH, parent, child),
+ child.getSourceLocation(), parent.getSourceLocation());
return false;
}
if (parent.getKind() == Member.POINTCUT) {
// System.err.println("check: " + child.getModifiers() +
// " more visible " + parent.getModifiers());
if (isMoreVisible(parent.getModifiers(), child.getModifiers())) {
- world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_VISIBILITY_REDUCTION, parent, child), child
- .getSourceLocation(), parent.getSourceLocation());
+ world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_VISIBILITY_REDUCTION, parent, child),
+ child.getSourceLocation(), parent.getSourceLocation());
return false;
}
boolean parentStatic = Modifier.isStatic(parent.getModifiers());
boolean childStatic = Modifier.isStatic(child.getModifiers());
if (parentStatic && !childStatic) {
- world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERRIDDEN_STATIC, child, parent), child
- .getSourceLocation(), null);
+ world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERRIDDEN_STATIC, child, parent),
+ child.getSourceLocation(), null);
return false;
} else if (childStatic && !parentStatic) {
- world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERIDDING_STATIC, child, parent), child
- .getSourceLocation(), null);
+ world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERIDDING_STATIC, child, parent),
+ child.getSourceLocation(), null);
return false;
}
return true;
}
private void addPointcutsResolvingConflicts(List<ResolvedMember> acc, List<ResolvedMember> added, boolean isOverriding) {
- for (Iterator i = added.iterator(); i.hasNext();) {
+ for (Iterator<ResolvedMember> i = added.iterator(); i.hasNext();) {
ResolvedPointcutDefinition toAdd = (ResolvedPointcutDefinition) i.next();
- for (Iterator j = acc.iterator(); j.hasNext();) {
+ for (Iterator<ResolvedMember> j = acc.iterator(); j.hasNext();) {
ResolvedPointcutDefinition existing = (ResolvedPointcutDefinition) j.next();
if (toAdd == null || existing == null || existing == toAdd) {
continue;
getWorld().showMessage(
IMessage.ERROR,
WeaverMessages.format(WeaverMessages.POINTCUT_NOT_VISIBLE, existing.getDeclaringType()
- .getName()
- + "." + existing.getName() + "()", this.getName()), toAdd.getSourceLocation(), null);
+ .getName() + "." + existing.getName() + "()", this.getName()),
+ toAdd.getSourceLocation(), null);
j.remove();
}
continue;
} else {
getWorld().showMessage(
IMessage.ERROR,
- WeaverMessages.format(WeaverMessages.CONFLICTING_INHERITED_POINTCUTS, this.getName()
- + toAdd.getSignature()), existing.getSourceLocation(), toAdd.getSourceLocation());
+ WeaverMessages.format(WeaverMessages.CONFLICTING_INHERITED_POINTCUTS,
+ this.getName() + toAdd.getSignature()), existing.getSourceLocation(),
+ toAdd.getSourceLocation());
j.remove();
}
}
* parameters replaced in accordance with the passed bindings.
*/
@Override
- public UnresolvedType parameterize(Map typeBindings) {
+ public UnresolvedType parameterize(Map<String, UnresolvedType> typeBindings) {
if (!isParameterizedType()) {
return this;// throw new IllegalStateException(
}
newTypeParams[i] = typeParameters[i];
if (newTypeParams[i].isTypeVariableReference()) {
TypeVariableReferenceType tvrt = (TypeVariableReferenceType) newTypeParams[i];
- UnresolvedType binding = (UnresolvedType) typeBindings.get(tvrt.getTypeVariable().getName());
+ UnresolvedType binding = typeBindings.get(tvrt.getTypeVariable().getName());
if (binding != null) {
newTypeParams[i] = binding;
}
// if (this.isPrimitiveType() || other.isPrimitiveType()) return
// this.isAssignableFrom(other);
// return this.isCoerceableFrom(other);
- //
+ //
// version from ResolvedTypeX
if (this.equals(OBJECT)) {
import java.util.Map;
import org.aspectj.util.GenericSignature;
-import org.aspectj.util.GenericSignatureParser;
import org.aspectj.util.GenericSignature.ClassSignature;
+import org.aspectj.util.GenericSignatureParser;
import org.aspectj.weaver.tools.Traceable;
/**
* their matching type variable binding.
*/
// OPTIMIZE methods like this just allow callers to be lazy and not ensure they are working with the right (resolved) subtype
- public UnresolvedType parameterize(Map typeBindings) {
+ public UnresolvedType parameterize(Map<String, UnresolvedType> typeBindings) {
throw new UnsupportedOperationException("unable to parameterize unresolved type: " + signature);
}
}
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ArgsPointcut, java.lang.Object)
- */
public Object visit(ArgsPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.BindingAnnotationTypePattern,
- * java.lang.Object)
- */
public Object visit(BindingAnnotationTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.BindingTypePattern, java.lang.Object)
- */
public Object visit(BindingTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.CflowPointcut, java.lang.Object)
- */
public Object visit(CflowPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ConcreteCflowPointcut, java.lang.Object)
- */
public Object visit(ConcreteCflowPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.DeclareAnnotation, java.lang.Object)
- */
public Object visit(DeclareAnnotation node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.DeclareErrorOrWarning, java.lang.Object)
- */
public Object visit(DeclareErrorOrWarning node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.DeclareParents, java.lang.Object)
- */
public Object visit(DeclareParents node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.DeclarePrecedence, java.lang.Object)
- */
public Object visit(DeclarePrecedence node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.DeclareSoft, java.lang.Object)
- */
public Object visit(DeclareSoft node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ExactAnnotationTypePattern,
- * java.lang.Object)
- */
public Object visit(ExactAnnotationTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ExactTypePattern, java.lang.Object)
- */
public Object visit(ExactTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.HandlerPointcut, java.lang.Object)
- */
public Object visit(HandlerPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.IfPointcut, java.lang.Object)
- */
public Object visit(IfPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.KindedPointcut, java.lang.Object)
- */
public Object visit(KindedPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ModifiersPattern, java.lang.Object)
- */
public Object visit(ModifiersPattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.NamePattern, java.lang.Object)
- */
public Object visit(NamePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.NotAnnotationTypePattern,
- * java.lang.Object)
- */
public Object visit(NotAnnotationTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.NotPointcut, java.lang.Object)
- */
public Object visit(NotPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.NotTypePattern, java.lang.Object)
- */
public Object visit(NotTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.OrAnnotationTypePattern, java.lang.Object)
- */
public Object visit(OrAnnotationTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.OrPointcut, java.lang.Object)
- */
public Object visit(OrPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.OrTypePattern, java.lang.Object)
- */
public Object visit(OrTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PerCflow, java.lang.Object)
- */
public Object visit(PerCflow node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PerFromSuper, java.lang.Object)
- */
public Object visit(PerFromSuper node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PerObject, java.lang.Object)
- */
public Object visit(PerObject node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PerSingleton, java.lang.Object)
- */
public Object visit(PerSingleton node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PerTypeWithin, java.lang.Object)
- */
public Object visit(PerTypeWithin node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.PatternNode, java.lang.Object)
- */
public Object visit(PatternNode node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ReferencePointcut, java.lang.Object)
- */
public Object visit(ReferencePointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.SignaturePattern, java.lang.Object)
- */
public Object visit(SignaturePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ThisOrTargetAnnotationPointcut,
- * java.lang.Object)
- */
public Object visit(ThisOrTargetAnnotationPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ThisOrTargetPointcut, java.lang.Object)
- */
public Object visit(ThisOrTargetPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.ThrowsPattern, java.lang.Object)
- */
public Object visit(ThrowsPattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.TypePatternList, java.lang.Object)
- */
public Object visit(TypePatternList node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WildAnnotationTypePattern,
- * java.lang.Object)
- */
public Object visit(WildAnnotationTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WildTypePattern, java.lang.Object)
- */
public Object visit(WildTypePattern node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WithinAnnotationPointcut,
- * java.lang.Object)
- */
public Object visit(WithinAnnotationPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WithinCodeAnnotationPointcut,
- * java.lang.Object)
- */
public Object visit(WithinCodeAnnotationPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WithinPointcut, java.lang.Object)
- */
public Object visit(WithinPointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.WithincodePointcut, java.lang.Object)
- */
public Object visit(WithincodePointcut node, Object data) {
return node;
}
- /*
- * (non-Javadoc)
- *
- * @see org.aspectj.weaver.patterns.PointcutVisitor#visit(org.aspectj.weaver.patterns.Pointcut.MatchesNothingPointcut,
- * java.lang.Object)
- */
public Object visit(MatchesNothingPointcut node, Object data) {
return node;
}
import org.aspectj.weaver.ResolvedPointcutDefinition;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
+import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.WeaverMessages;
ResolvedType concreteAspect = bindings.getConcreteAspect();
CrosscuttingMembers xcut = concreteAspect.crosscuttingMembers;
- Collection previousCflowEntries = xcut.getCflowEntries();
+ Collection<ShadowMunger> previousCflowEntries = xcut.getCflowEntries();
entryBindings.pushEnclosingDefinition(CFLOW_MARKER);
// This block concretizes the pointcut within the cflow pointcut
entryBindings.popEnclosingDefinitition();
}
- List innerCflowEntries = new ArrayList(xcut.getCflowEntries());
+ List<ShadowMunger> innerCflowEntries = new ArrayList<ShadowMunger>(xcut.getCflowEntries());
innerCflowEntries.removeAll(previousCflowEntries);
// Four routes of interest through this code (did I hear someone say
import org.aspectj.weaver.ResolvedMemberImpl;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
+import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.World;
CrosscuttingMembers xcut = inAspect.crosscuttingMembers;
- Collection previousCflowEntries = xcut.getCflowEntries();
+ Collection<ShadowMunger> previousCflowEntries = xcut.getCflowEntries();
Pointcut concreteEntry = entry.concretize(inAspect, inAspect, 0, null); // IntMap
// .
// EMPTY
// )
// ;
- List innerCflowEntries = new ArrayList(xcut.getCflowEntries());
+ List<ShadowMunger> innerCflowEntries = new ArrayList<ShadowMunger>(xcut.getCflowEntries());
innerCflowEntries.removeAll(previousCflowEntries);
xcut.addConcreteShadowMunger(Advice.makePerCflowEntry(world, concreteEntry, isBelow, cflowStackField, inAspect,
// ATAJ: add a munger to add the aspectOf(..) to the @AJ aspects
if (inAspect.isAnnotationStyleAspect() && !inAspect.isAbstract()) {
- inAspect.crosscuttingMembers.addLateTypeMunger(inAspect.getWorld().getWeavingSupport().makePerClauseAspect(inAspect,
- getKind()));
+ inAspect.crosscuttingMembers.addLateTypeMunger(inAspect.getWorld().getWeavingSupport()
+ .makePerClauseAspect(inAspect, getKind()));
}
// ATAJ inline around advice support - don't use a late munger to allow
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
return typePatterns;
}
- public Collection getExactTypes() {
- ArrayList ret = new ArrayList();
+ public List<UnresolvedType> getExactTypes() {
+ List<UnresolvedType> ret = new ArrayList<UnresolvedType>();
for (int i = 0; i < typePatterns.length; i++) {
UnresolvedType t = typePatterns[i].getExactType();
if (!ResolvedType.isMissing(t)) {