return new ResolvedMemberImpl(Member.METHOD,
declaringType, PUBLIC_STATIC, "hasAspect",
"()Z");
- };
+ }
public static ResolvedMember perCflowAspectOfMethod(UnresolvedType declaringType) {
return perSingletonAspectOfMethod(declaringType);
public static ResolvedMember perCflowHasAspectMethod(UnresolvedType declaringType) {
return perSingletonHasAspectMethod(declaringType);
- };
+ }
public static ResolvedMember perObjectAspectOfMethod(UnresolvedType declaringType) {
return new ResolvedMemberImpl(Member.METHOD,
return new ResolvedMemberImpl(Member.METHOD,
declaringType, PUBLIC_STATIC, "hasAspect",
"(Ljava/lang/Object;)Z");
- };
+ }
// PTWIMPL ResolvedMember for aspectOf(), declared in aspect
public static ResolvedMember perTypeWithinAspectOfMethod(UnresolvedType declaringType,boolean inJava5Mode) {
// return new ResolvedMemberImpl(Member.METHOD,
// declaringType, PUBLIC_STATIC, "hasAspect",
// "(Ljava/lang/Class;)Z");
- };
+ }
// -- privileged accessors
* @author Jim Hugunin
*/
public class CrosscuttingMembersSet {
- private World world;
//FIXME AV - ? we may need a sequencedHashMap there to ensure source based precedence for @AJ advice
private Map /* ResolvedType (the aspect) > CrosscuttingMembers */members = new HashMap();
public CrosscuttingMembersSet(World world) {
trace.enter("<init>",this,world);
- this.world = world;
-
trace.exit("<init>");
}
if (isAssignableFrom((ResolvedType)other.getRawType())) return true;
}
if (this.isGenericType() && other.isRawType()) {
- if (isAssignableFrom((ResolvedType)other.getGenericType())) return true;
+ if (isAssignableFrom(other.getGenericType())) return true;
}
if (this.isParameterizedType()) {
if (parameterizedInterfaces != null) return parameterizedInterfaces;
if (isParameterizedType()) {
ResolvedType[] delegateInterfaces = delegate.getDeclaredInterfaces();
- UnresolvedType[] paramTypes = getTypesForMemberParameterization();
+// UnresolvedType[] paramTypes = getTypesForMemberParameterization();
parameterizedInterfaces = new ResolvedType[delegateInterfaces.length];
for (int i = 0; i < delegateInterfaces.length; i++) {
// We may have to sub/super set the set of parametertypes if the implemented interface
* Locates the named type variable in the list of those on this generic type and returns
* the type parameter from the second list supplied. Returns null if it can't be found
*/
- private UnresolvedType findTypeParameterInList(String name, TypeVariable[] tvarsOnThisGenericType, UnresolvedType[] paramTypes) {
- int position = -1;
- for (int i = 0; i < tvarsOnThisGenericType.length; i++) {
- TypeVariable tv = tvarsOnThisGenericType[i];
- if (tv.getName().equals(name)) position = i;
- }
- if (position == -1 ) return null;
- return paramTypes[position];
- }
+// private UnresolvedType findTypeParameterInList(String name, TypeVariable[] tvarsOnThisGenericType, UnresolvedType[] paramTypes) {
+// int position = -1;
+// for (int i = 0; i < tvarsOnThisGenericType.length; i++) {
+// TypeVariable tv = tvarsOnThisGenericType[i];
+// if (tv.getName().equals(name)) position = i;
+// }
+// if (position == -1 ) return null;
+// return paramTypes[position];
+// }
/**
int ps = s.readInt();
UnresolvedType[] params = new UnresolvedType[ps];
for (int i = 0; i < params.length; i++) {
- UnresolvedType type = params[i];
params[i]=TypeFactory.createTypeFromSignature(s.readUTF());
}
UnresolvedType rt = TypeFactory.createTypeFromSignature(s.readUTF());
ConcreteTypeMunger munger = (ConcreteTypeMunger) iter.next();
if (munger.getSignature() != null && munger.getSignature().isAbstract()) { // Rule 1
if (munger.getMunger().getKind() == ResolvedTypeMunger.MethodDelegate) {
- ;//ignore for @AJ ITD as munger.getSignature() is the interface method hence abstract
+ //ignore for @AJ ITD as munger.getSignature() is the interface method hence abstract
} else {
world.getMessageHandler().handleMessage(
new Message("must implement abstract inter-type declaration: " + munger.getSignature(),
return;
}
- ConcreteTypeMunger originalMunger = munger;
+// ConcreteTypeMunger originalMunger = munger;
// we will use the 'parameterized' ITD for all the comparisons but we say the original
// one passed in actually matched as it will be added to the intertype member finder
// for the target type. It is possible we only want to do this if a generic type
existingMember),
munger.getSourceLocation())
);
- ;
+
}
//return;
}
return this;
}
- private ResolvedType findHigher(ResolvedType other) {
- if (this == other) return this;
- for(Iterator i = other.getDirectSupertypes(); i.hasNext(); ) {
- ResolvedType rtx = (ResolvedType)i.next();
- boolean b = this.isAssignableFrom(rtx);
- if (b) return rtx;
- }
- return null;
- }
-
public List getExposedPointcuts() {
List ret = new ArrayList();
if (getSuperclass() != null) ret.addAll(getSuperclass().getExposedPointcuts());
int deCtr = 1;
int dwCtr = 1;
for (Iterator iter = children.iterator(); iter.hasNext();) {
- Object element = (Object) iter.next();
+ Object element = iter.next();
if (element instanceof DeclareErrorOrWarning) {
DeclareErrorOrWarning decl = (DeclareErrorOrWarning)element;
int counter = 0;
import java.io.DataOutputStream;
import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
/**
* Represents a type variable with bounds
return resolve(UnresolvedType.forName(name),allowMissing);
}
- private ResolvedType currentlyResolvingBaseType;
-
/**
* Resolve to a ReferenceType - simple, raw, parameterized, or generic.
* Raw, parameterized, and generic versions of a type share a delegate.
ResolvedType rt = resolveGenericTypeFor(ty,allowMissing);
if (rt.isMissing()) return rt;
ReferenceType genericType = (ReferenceType)rt;
- currentlyResolvingBaseType = genericType;
- ReferenceType parameterizedType =
+ ReferenceType parameterizedType =
TypeFactory.createParameterizedType(genericType, ty.typeParameters, this);
- currentlyResolvingBaseType = null;
return parameterizedType;
} else if (ty.isGenericType()) {
public ResolvedType resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing) {
// Look up the raw type by signature
String rawSignature = anUnresolvedType.getRawType().getSignature();
- ResolvedType rawType = (ResolvedType) typeMap.get(rawSignature);
+ ResolvedType rawType = typeMap.get(rawSignature);
if (rawType==null) {
rawType = resolve(UnresolvedType.forSignature(rawSignature),allowMissing);
typeMap.put(rawSignature,rawType);
private static boolean debug = false;
// Strategy for entries in the expendable map
- public static int DONT_USE_REFS = 0; // Hang around forever
- public static int USE_WEAK_REFS = 1; // Collected asap
- public static int USE_SOFT_REFS = 2; // Collected when short on memory
+ public final static int DONT_USE_REFS = 0; // Hang around forever
+ public final static int USE_WEAK_REFS = 1; // Collected asap
+ public final static int USE_SOFT_REFS = 2; // Collected when short on memory
// SECRETAPI - Can switch to a policy of choice ;)
public static int policy = USE_SOFT_REFS;
protected boolean isExpendable(ResolvedType type) {
return (
!type.equals(UnresolvedType.OBJECT) &&
- (type != null) &&
(!type.isExposedToWeaver()) &&
(!type.isPrimitiveType())
);
return false;
}
}
+
+ public int hashCode() {
+ return v.hashCode()*37+annType.hashCode();
+ }
public Var getVar() {
return v;
return false;
}
}
+
+ public int hashCode() {
+ return var.hashCode()*37+type.hashCode();
+ }
public Var getVar() {
return var;
return false;
}
}
+
+ public int hashCode() {
+ return test.hashCode();
+ }
}
}
}
+ public int hashCode() {
+ int result = 19;
+ result = 37*result + left.hashCode();
+ result = 37*result + right.hashCode();
+ return result;
+ }
+
public Test getLeft() {
return left;
}
boolean doneAndDusted = false;
for (Iterator iterator = vals.iterator(); iterator.hasNext();) {
ElementNameValuePairGen object = (ElementNameValuePairGen) iterator.next();
- String name = object.getNameString();
+// String name = object.getNameString();
EnumElementValueGen v = (EnumElementValueGen) object.getValue();
String s = v.getEnumTypeString();
ResolvedType rt = toType.getWorld().resolve(UnresolvedType.forSignature(s));
for (int j = 0; j < mattributes.length; j++) {
Attribute mattribute = mattributes[j];
if (acceptAttribute(mattribute)) {
- if (mstruct==null) mstruct = new AjAttributeMethodStruct(method, null, type, context, msgHandler);//FIXME AVASM
+ mstruct = new AjAttributeMethodStruct(method, null, type, context, msgHandler);//FIXME AVASM
processedPointcut = handlePointcutAnnotation((RuntimeAnnotations) mattribute, mstruct);
// there can only be one RuntimeVisible bytecode attribute
break;
type.getSourceLocation()
)
);
- ;// go ahead
+ // go ahead
}
}
// there can only be one RuntimeVisible bytecode attribute
type.getSourceLocation()
)
);
- ;// go ahead
+ // go ahead
}
// semantic check - advice must be public
if (hasAtAspectJAnnotation && !struct.method.isPublic()) {
type.getSourceLocation()
)
);
- ;// go ahead
+ // go ahead
}
// semantic check - advice must not be static
// type.getSourceLocation()
// )
// );
- ;// go ahead
+ // go ahead
}
// semantic check for non around advice must return void
type.getSourceLocation()
)
);
- ;// go ahead
+ // go ahead
}
return struct.ajAttributes;
boolean hasAtLeastOneMethod = false;
ResolvedMember[] methods = (ResolvedMember[])fieldType.getMethodsWithoutIterator(true, false).toArray(new ResolvedMember[0]);
for (int i = 0; i < methods.length; i++) {
- ResolvedMember method = (ResolvedMember)methods[i];
+ ResolvedMember method = methods[i];
if (method.isAbstract()) {
// moved to be detected at weave time if the target doesnt implement the methods
// if (defaultImplClassName == null) {
if (!(Type.VOID.equals(struct.method.getReturnType())
|| (Type.BOOLEAN.equals(struct.method.getReturnType()) && struct.method.isStatic() && struct.method.isPublic()))) {
reportWarning("Found @Pointcut on a method not returning 'void' or not 'public static boolean'", struct);
- ;//no need to stop
+ //no need to stop
}
// semantic check: the method must not throw anything
if (struct.method.getExceptionTable() != null) {
reportWarning("Found @Pointcut on a method throwing exception", struct);
- ;// no need to stop
+ // no need to stop
}
String argumentNames = getArgNamesValue(pointcut);
return sb.toString();
}
- /**
- * Returns a readable representation of a field.
- * Field.toString() is not suitable.
- *
- * @param field
- * @return a readable representation of a field
- */
- private static String fieldToString(Field field) {
- StringBuffer sb = new StringBuffer();
- sb.append(field.getName()).append(' ');
- sb.append(field.getSignature());
- return sb.toString();
- }
-
/**
* Build the bindings for a given method (pointcut / advice)
*
private static FormalBinding[] extractBindings(AjAttributeMethodStruct struct, String excludeFormal)
throws UnreadableDebugInfoException {
FormalBinding[] bindings = extractBindings(struct);
- int excludeIndex = -1;
+// int excludeIndex = -1;
for (int i = 0; i < bindings.length; i++) {
FormalBinding binding = bindings[i];
if (binding.getName().equals(excludeFormal)) {
- excludeIndex = i;
+// excludeIndex = i;
bindings[i] = new FormalBinding.ImplicitFormalBinding(
binding.getType(), binding.getName(), binding.getIndex()
);
final int startAtStackIndex = method.isStatic() ? 0 : 1;
final List arguments = new ArrayList();
- LocalVariableTable lt = (LocalVariableTable) method.getLocalVariableTable();
+ LocalVariableTable lt = method.getLocalVariableTable();
if (lt != null) {
for (int j = 0; j < lt.getLocalVariableTable().length; j++) {
LocalVariable localVariable = lt.getLocalVariableTable()[j];
private void removeUnnecessaryProblems(BcelMethod method, int problemLineNumber) {
ISourceContext sourceContext = method.getSourceContext();
if (sourceContext instanceof IEclipseSourceContext) {
- if (sourceContext != null
- && sourceContext instanceof IEclipseSourceContext) {
- ((IEclipseSourceContext)sourceContext).removeUnnecessaryProblems(method, problemLineNumber);
- }
+ ((IEclipseSourceContext)sourceContext).removeUnnecessaryProblems(method, problemLineNumber);
}
}
BcelVar extraArgVar,
InstructionHandle ifNoAdvice)
{
- BcelShadow shadow = (BcelShadow) s;
+ BcelShadow shadow = s;
InstructionFactory fact = shadow.getFactory();
BcelWorld world = shadow.getWorld();
if (v == null) {
// if not @AJ aspect, go on with the regular binding handling
if (!isAnnotationStyleAspect) {
- ;
+
} else {
// ATAJ: for @AJ aspects, handle implicit binding of xxJoinPoint
//if (getKind() == AdviceKind.Around) {
private Map mapToAnnotations = new HashMap();
- private BcelShadow clinitShadow = null;
+// private BcelShadow clinitShadow = null;
/**
* This holds the initialization and pre-initialization shadows for this class
private List[] perKindShadowMungers;
private boolean canMatchBodyShadows = false;
- private boolean canMatchInitialization = false;
+// private boolean canMatchInitialization = false;
private void fastMatchShadowMungers(List shadowMungers) {
// beware the annoying property that SHADOW_KINDS[i].getKey == (i+1) !
// }
}
- if (!perKindShadowMungers[Shadow.Initialization.getKey()].isEmpty())
- canMatchInitialization = true;
+// if (!perKindShadowMungers[Shadow.Initialization.getKey()].isEmpty())
+// canMatchInitialization = true;
for (int i = 0; i < Shadow.SHADOW_KINDS.length; i++) {
Shadow.Kind kind = Shadow.SHADOW_KINDS[i];
InstructionHandle call = findSuperOrThisCall(mg);
InstructionList body = mg.getBody();
ShadowRange r = new ShadowRange(body);
- r.associateWithShadow((BcelShadow) s);
+ r.associateWithShadow( s);
if (s.getKind() == Shadow.PreInitialization) {
// XXX assert first instruction is an ALOAD_0.
// a pre shadow goes from AFTER the first instruction (which we believe to
InstructionList body = synchronizedMethod.getBody();
InstructionList prepend = new InstructionList();
Type enclosingClassType = BcelWorld.makeBcelType(synchronizedMethod.getEnclosingClass().getType());
- Type javaLangClassType = Type.getType(Class.class);
// STATIC METHOD TRANSFORMATION
}
// second pass: retarget branch instructions, copy ranges and tags
- Map tagMap = new HashMap();
- Map shadowMap = new HashMap();
+ Map tagMap = new HashMap();
for (InstructionHandle dest = newList.getStart(), src = sourceList.getStart();
dest != null;
dest = dest.getNext(), src = src.getNext()) {
return false;
} else {
if (startsAngly && mg.getName().equals("<clinit>")) {
- clinitShadow = enclosingShadow = BcelShadow.makeStaticInitialization(world, mg);
+// clinitShadow =
+ enclosingShadow = BcelShadow.makeStaticInitialization(world, mg);
//System.err.println(enclosingShadow);
} else if (mg.isAdviceMethod()) {
enclosingShadow = BcelShadow.makeAdviceExecution(world, mg);
// XXX we don't do pre-inits of interfaces
// now add interface inits
- if (superOrThisCall != null && ! isThisCall(superOrThisCall)) {
+ if (! isThisCall(superOrThisCall)) {
InstructionHandle curr = enclosingShadow.getRange().getStart();
for (Iterator i = addedSuperInitializersAsList.iterator(); i.hasNext(); ) {
IfaceInitList l = (IfaceInitList) i.next();
shadow.implement();
CompilationAndWeavingContext.leavingPhase(tok);
}
- int ii = mg.getMaxLocals();
+// int ii =
+ mg.getMaxLocals();
mg.matchedShadows = null;
}
private BcelObjectType bcelObjectType;
private int bitflags;
- private static final int KNOW_IF_SYNTHETIC = 0x0001; // used
- private static final int PARAMETER_NAMES_INITIALIZED = 0x0002; // used
- private static final int CAN_BE_PARAMETERIZED = 0x0004; // used
- private static final int UNPACKED_GENERIC_SIGNATURE = 0x0008; // used
- private static final int HAS_EFFECTIVE_SIGNATURE = 0x0010;
- private static final int HAS_PRERESOLVED_POINTCUT = 0x0020;
+ private static final int KNOW_IF_SYNTHETIC = 0x0001;
+ private static final int PARAMETER_NAMES_INITIALIZED = 0x0002;
+ private static final int CAN_BE_PARAMETERIZED = 0x0004;
+ private static final int UNPACKED_GENERIC_SIGNATURE = 0x0008;
private static final int IS_AJ_SYNTHETIC = 0x0040;
private static final int IS_SYNTHETIC = 0x0080;
private static final int IS_SYNTHETIC_INVERSE = 0x7f7f; // all bits but IS_SYNTHETIC (and topmost bit)
- private static final int HAS_ASSOCIATED_SHADOWMUNGER = 0x0100;
- private static final int HAS_GENERIC_RETPARAM_TYPES = 0x0200;
- private static final int HAS_ANNOTATIONS = 0x0400; // used
- private static final int HAVE_DETERMINED_ANNOTATIONS = 0x0800; // used
- private static final int HAS_MD_LINE_NUMBER_ATTRIBUTE= 0x1000;
+ private static final int HAS_ANNOTATIONS = 0x0400;
+ private static final int HAVE_DETERMINED_ANNOTATIONS = 0x0800;
// genericized version of return and parameter types
public String[] getAttributeNames(boolean onlyIncludeAjOnes) {
Attribute[] as = method.getAttributes();
List names = new ArrayList();
- String[] strs = new String[as.length];
+// String[] strs = new String[as.length];
for (int j = 0; j < as.length; j++) {
if (!onlyIncludeAjOnes || as[j].getName().startsWith(AjAttribute.AttributePrefix))
names.add(as[j].getName());
InstructionList il = method.getBody();
il.append(Utility.createGet(factory, AjcMemberMaker.perSingletonField(aspectType)));
- InstructionBranch ifNull = (InstructionBranch)InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
+ InstructionBranch ifNull = InstructionFactory.createBranchInstruction(Constants.IFNULL, null);
il.append(ifNull);
il.append(InstructionFactory.PUSH(classGen.getConstantPool(), true));
il.append(InstructionFactory.createReturn(Type.INT));
ifNonNull.setTarget(end);
}
- private void generatePerObjectGetSetMethods(LazyClassGen classGen) {
- InstructionFactory factory = classGen.getFactory();
-
- LazyMethodGen methodGet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceGet(aspectType));
- flagAsSynthetic(methodGet, true);
- classGen.addMethodGen(methodGet);
- InstructionList ilGet = methodGet.getBody();
- ilGet = new InstructionList();
- ilGet.append(InstructionConstants.ALOAD_0);
- ilGet.append(Utility.createGet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
- ilGet.append(InstructionFactory.createReturn(Type.OBJECT));
-
- LazyMethodGen methodSet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceSet(aspectType));
- flagAsSynthetic(methodSet, true);
- classGen.addMethodGen(methodSet);
- InstructionList ilSet = methodSet.getBody();
- ilSet = new InstructionList();
- ilSet.append(InstructionConstants.ALOAD_0);
- ilSet.append(InstructionConstants.ALOAD_1);
- ilSet.append(Utility.createSet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
- ilSet.append(InstructionFactory.createReturn(Type.VOID));
- }
+// private void generatePerObjectGetSetMethods(LazyClassGen classGen) {
+// InstructionFactory factory = classGen.getFactory();
+//
+// LazyMethodGen methodGet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceGet(aspectType));
+// flagAsSynthetic(methodGet, true);
+// classGen.addMethodGen(methodGet);
+// InstructionList ilGet = methodGet.getBody();
+// ilGet = new InstructionList();
+// ilGet.append(InstructionConstants.ALOAD_0);
+// ilGet.append(Utility.createGet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
+// ilGet.append(InstructionFactory.createReturn(Type.OBJECT));
+//
+// LazyMethodGen methodSet = makeMethodGen(classGen, AjcMemberMaker.perObjectInterfaceSet(aspectType));
+// flagAsSynthetic(methodSet, true);
+// classGen.addMethodGen(methodSet);
+// InstructionList ilSet = methodSet.getBody();
+// ilSet = new InstructionList();
+// ilSet.append(InstructionConstants.ALOAD_0);
+// ilSet.append(InstructionConstants.ALOAD_1);
+// ilSet.append(Utility.createSet(factory, AjcMemberMaker.perObjectField(aspectType, aspectType)));
+// ilSet.append(InstructionFactory.createReturn(Type.VOID));
+// }
private void generatePerCflowAspectOfMethod(LazyClassGen classGen) {
InstructionFactory factory = classGen.getFactory();
Member getClass = MemberImpl.method(UnresolvedType.OBJECT, 0, UnresolvedType.JAVA_LANG_CLASS,"getClass", UnresolvedType.NONE);
il.append(Utility.createInvoke(fact, world, getClass));
// aload annotationClass
- String s = hasAnnotation.getAnnotationType().getName();
il.append(fact.createConstant(new ObjectType(hasAnnotation.getAnnotationType().getName())));
// int annClassIndex = fact.getConstantPool().addClass(hasAnnotation.getAnnotationType().getSignature());
// il.append(new LDC_W(annClassIndex));
import org.aspectj.weaver.patterns.IdentityPointcutVisitor;
import org.aspectj.weaver.patterns.NotPointcut;
import org.aspectj.weaver.patterns.OrPointcut;
-import org.aspectj.weaver.patterns.Pointcut;
import org.aspectj.weaver.patterns.ThisOrTargetPointcut;
}
if (getKind() == ConstructorCall) {
if (!world.isJoinpointArrayConstructionEnabled() || !this.getSignature().getDeclaringType().isArray()) {
- range.insert((Instruction) InstructionFactory.createDup(1), Range.InsideBefore);
+ range.insert(InstructionFactory.createDup(1), Range.InsideBefore);
range.insert(
fact.createNew(
(ObjectType) BcelWorld.makeBcelType(
final InstructionList il = new InstructionList();
int alen = getArgCount() ;
il.append(Utility.createConstant(fact, alen));
- il.append((Instruction)fact.createNewArray(Type.OBJECT, (short)1));
+ il.append(fact.createNewArray(Type.OBJECT, (short)1));
arrayVar.appendStore(il, fact);
int stateIndex = 0;
int alen = cflowStateVars.length;
entrySuccessInstructions.append(Utility.createConstant(fact, alen));
- entrySuccessInstructions.append(
- (Instruction) fact.createNewArray(Type.OBJECT, (short) 1));
+ entrySuccessInstructions.append(fact.createNewArray(Type.OBJECT, (short) 1));
arrayVar.appendStore(entrySuccessInstructions, fact);
for (int i = 0; i < alen; i++) {
return ret;
}
- private static boolean bindsThisOrTarget(Pointcut pointcut) {
- ThisTargetFinder visitor = new ThisTargetFinder();
- pointcut.accept(visitor, null);
- return visitor.bindsThisOrTarget;
- }
+// private static boolean bindsThisOrTarget(Pointcut pointcut) {
+// ThisTargetFinder visitor = new ThisTargetFinder();
+// pointcut.accept(visitor, null);
+// return visitor.bindsThisOrTarget;
+// }
- private static class ThisTargetFinder extends IdentityPointcutVisitor {
- boolean bindsThisOrTarget = false;
-
- public Object visit(ThisOrTargetPointcut node, Object data) {
- if (node.isBinding()) {
- bindsThisOrTarget = true;
- }
- return node;
- }
-
- public Object visit(AndPointcut node, Object data) {
- if (!bindsThisOrTarget) node.getLeft().accept(this, data);
- if (!bindsThisOrTarget) node.getRight().accept(this, data);
- return node;
- }
-
- public Object visit(NotPointcut node, Object data) {
- if (!bindsThisOrTarget) node.getNegatedPointcut().accept(this, data);
- return node;
- }
-
- public Object visit(OrPointcut node, Object data) {
- if (!bindsThisOrTarget) node.getLeft().accept(this, data);
- if (!bindsThisOrTarget) node.getRight().accept(this, data);
- return node;
- }
- }
+// private static class ThisTargetFinder extends IdentityPointcutVisitor {
+// boolean bindsThisOrTarget = false;
+//
+// public Object visit(ThisOrTargetPointcut node, Object data) {
+// if (node.isBinding()) {
+// bindsThisOrTarget = true;
+// }
+// return node;
+// }
+//
+// public Object visit(AndPointcut node, Object data) {
+// if (!bindsThisOrTarget) node.getLeft().accept(this, data);
+// if (!bindsThisOrTarget) node.getRight().accept(this, data);
+// return node;
+// }
+//
+// public Object visit(NotPointcut node, Object data) {
+// if (!bindsThisOrTarget) node.getNegatedPointcut().accept(this, data);
+// return node;
+// }
+//
+// public Object visit(OrPointcut node, Object data) {
+// if (!bindsThisOrTarget) node.getLeft().accept(this, data);
+// if (!bindsThisOrTarget) node.getRight().accept(this, data);
+// return node;
+// }
+// }
/**
* ATAJ Handle the inlining for @AJ aspects
((targetVar != null && targetVar != thisVar) ? 1 : 0) +
(thisJoinPointVar == null ? 0 : 1);
il.append(Utility.createConstant(fact, alen));
- il.append((Instruction)fact.createNewArray(Type.OBJECT, (short)1));
+ il.append(fact.createNewArray(Type.OBJECT, (short)1));
arrayVar.appendStore(il, fact);
int stateIndex = 0;
IntMap ret = new IntMap();
for(int i = 0, len = adviceArgs.length; i < len; i++) {
- BcelVar v = (BcelVar) adviceArgs[i];
+ BcelVar v = adviceArgs[i];
if (v == null) continue; // XXX we don't know why this is required
int pos = v.getPositionInAroundState();
if (pos >= 0) { // need this test to avoid args bound via cflow
body.append(Utility.createConstant(fact, len));
- body.append((Instruction)fact.createNewArray(Type.OBJECT, (short)1));
+ body.append(fact.createNewArray(Type.OBJECT, (short)1));
arrayVar.appendStore(body, fact);
for (int i = len - 1; i >= 0; i++) {
}
} else if (munger.getKind().equals(ResolvedTypeMunger.FieldHost)) {
- ;//hidden
+ //hidden
} else {
ResolvedMember declaredSig = munger.getSignature();
// if (declaredSig==null) declaredSig= munger.getSignature();
// Algorithm: Step1. Check in this type - has someone already created the bridge method?
// Step2. Look above us - do we 'override' a method and yet differ in return type (i.e. covariance)
// Step3. Create a forwarding bridge method
- ResolvedType superclass = onType.getSuperclass();
+// ResolvedType superclass = onType.getSuperclass();
boolean quitRightNow = false;
String localMethodName = unMangledInterMethod.getName();
LazyMethodGen bridgeMethod = makeMethodGen(clazz,theBridgeMethod); // The bridge method in this type will have the same signature as the one in the supertype
bridgeMethod.setAccessFlags(bridgeMethod.getAccessFlags() | 0x00000040 /*BRIDGE = 0x00000040*/ );
- UnresolvedType[] newParams = munger.getSignature().getParameterTypes();
+// UnresolvedType[] newParams = munger.getSignature().getParameterTypes();
Type returnType = BcelWorld.makeBcelType(theBridgeMethod.getReturnType());
body = bridgeMethod.getBody();
fact = clazz.getFactory();
// don't signal error as it could be a consequence of a wild type pattern
return false;
}
- boolean shouldApply = munger.matches(weaver.getLazyClassGen().getType(), aspectType);
+// boolean shouldApply =
+ munger.matches(weaver.getLazyClassGen().getType(), aspectType); // why do this?
ResolvedMember host = AjcMemberMaker.itdAtDeclareParentsField(
weaver.getLazyClassGen().getType(),
munger.getSignature().getType(),
ResolvedMember toBridgeTo = munger.getDeclaredSignature().parameterizedWith(null,munger.getSignature().getDeclaringType().resolve(getWorld()),false,munger.getTypeVariableAliases());
boolean needsbridging = false;
if (!toBridgeTo.getReturnType().getErasureSignature().equals(munger.getSignature().getReturnType().getErasureSignature())) needsbridging = true;
- if (toBridgeTo!=null && needsbridging) {
+ if (needsbridging) {
ResolvedMember bridgingGetter = AjcMemberMaker.interFieldInterfaceGetter(toBridgeTo, gen.getType(), aspectType);
createBridgeMethodForITDF(weaver,gen,itdfieldGetter,bridgingGetter);
}
if (munger.getDeclaredSignature()!=null) {
ResolvedMember toBridgeTo = munger.getDeclaredSignature().parameterizedWith(null,munger.getSignature().getDeclaringType().resolve(getWorld()),false,munger.getTypeVariableAliases());
boolean needsbridging = false;
- if (!toBridgeTo.getReturnType().getErasureSignature().equals(munger.getSignature().getReturnType().getErasureSignature())) needsbridging = true;
- if (toBridgeTo!=null && needsbridging) {
+ if (!toBridgeTo.getReturnType().getErasureSignature().equals(munger.getSignature().getReturnType().getErasureSignature())) {
+ needsbridging = true;
+ }
+ if (needsbridging) {
ResolvedMember bridgingSetter = AjcMemberMaker.interFieldInterfaceSetter(toBridgeTo, gen.getType(), aspectType);
createBridgeMethodForITDF(weaver, gen, itdfieldSetter, bridgingSetter);
}
if (input.isApplyAtAspectJMungersOnly()) {
ContextToken atAspectJMungersOnly = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY, "");
requestor.weavingAspects();
- ContextToken aspectToken = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_ASPECTS, "");
+// ContextToken aspectToken =
+ CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.WEAVING_ASPECTS, "");
for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {
UnwovenClassFile classFile = (UnwovenClassFile)i.next();
String className = classFile.getClassName();
public int hashCode() {
return 37 + 17*lineNo + 17*inAspect.hashCode();
- };
+ }
}
// FIXME asc Should be factored out into Xlint code and done automatically for all xlint messages, ideally.
delegate = getClassLoaderRepositoryFor(loaderRef);
}
}
-
- private ClassLoader getClassLoader() {
- return loaderRef.getClassLoader();
- }
public Repository getClassLoaderRepositoryFor(ClassLoaderReference loader) {
if (bcelRepositoryCaching) {
protected ReferenceTypeDelegate resolveDelegate(ReferenceType ty) {
String name = ty.getName();
- JavaClass jc = null;
- ensureAdvancedConfigurationProcessed();
- //UnwovenClassFile classFile = (UnwovenClassFile)sourceJavaClasses.get(name);
- //if (classFile != null) jc = classFile.getJavaClass();
-// if (isFastDelegateSupportEnabled() && classPath!=null && !ty.needsModifiableDelegate() && isNotOnPackageRestrictedList(name)) {
-// ClassPathManager.ClassFile cf = classPath.find(ty);
-// if (cf==null) {
-// return null;
-// } else {
-// ReferenceTypeDelegate delegate = buildAsmDelegate(ty,cf);
-// if (fallbackToLoadingBcelDelegatesForAspects && delegate.isAspect()) {
-// // bugger - pr135001 - we can't inline around advice from an aspect because we don't load the instructions.
-// // fixing this quick to get AJDT upgraded with a good 1.5.2dev build.
-// // other fixes would be:
-// // 1. record that we are loading the superclass for an aspect, so we know to make it a BCEL delegate
-// //
-// // the 'fix' here is only reasonable because there are many less aspects than classes!
-//
-// // Create a BCEL delegate
-// if (jc == null) jc = lookupJavaClass(classPath, name);
-// if (jc == null) return delegate; // worrying situation ?!?
-// else return buildBcelDelegate(ty, jc, false);
-// } else {
-// return delegate;
-// }
-// }
-// } else {
- if (jc == null) {
- jc = lookupJavaClass(classPath, name);
- }
- if (jc == null) {
- return null;
- } else {
- return buildBcelDelegate(ty, jc, false);
- }
-// }
+ ensureAdvancedConfigurationProcessed();
+ JavaClass jc = lookupJavaClass(classPath, name);
+ if (jc == null) {
+ return null;
+ } else {
+ return buildBcelDelegate(ty, jc, false);
+ }
}
-// private ReferenceTypeDelegate buildAsmDelegate(ReferenceType type,ClassPathManager.ClassFile t) {
-// AsmDelegate asmDelegate;
-// try {
-// asmDelegate = new AsmDelegate(type,t.getInputStream());
-// } catch (IOException e) {
-// e.printStackTrace();
-// return null;
-// }
-// return asmDelegate;
-// }
-
public BcelObjectType buildBcelDelegate(ReferenceType resolvedTypeX, JavaClass jc, boolean exposedToWeaver) {
BcelObjectType ret = new BcelObjectType(resolvedTypeX, jc, exposedToWeaver);
return ret;
UnresolvedType.forName(javaClass.getClassName()), mods, method.getName(), method.getSignature());
}
- private static final String[] ZERO_STRINGS = new String[0];
-
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("BcelWorld(");
if (trace.isTraceEnabled()) trace.exit("<init>");
}
- protected ClassPathManager() {};
+ protected ClassPathManager() {}
public void addPath (String name, IMessageHandler handler) {
File f = new File(name);
boolean hasIf = false;
public Object visit(IfPointcut node, Object data) {
if (node.alwaysFalse() || node.alwaysTrue()) {
- ;//IfFalse / IfTrue
+ //IfFalse / IfTrue
} else {
hasIf = true;
}
import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.apache.bcel.classfile.Signature;
import org.aspectj.apache.bcel.classfile.Synthetic;
-import org.aspectj.apache.bcel.classfile.Unknown;
import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
import org.aspectj.apache.bcel.generic.BasicType;
import org.aspectj.apache.bcel.generic.ClassGen;
return ((InlinedSourceFileInfo) inlinedFiles.get(fullpath)).offset;
}
- private Unknown getSourceDebugExtensionAttribute() {
- int nameIndex = cp.addUtf8("SourceDebugExtension");
- String data = getSourceDebugExtensionString();
- //System.err.println(data);
- byte[] bytes = Utility.stringToUTF(data);
- int length = bytes.length;
-
- return new Unknown(nameIndex, length, bytes, cp);
- }
+// private Unknown getSourceDebugExtensionAttribute() {
+// int nameIndex = cp.addUtf8("SourceDebugExtension");
+// String data = getSourceDebugExtensionString();
+// //System.err.println(data);
+// byte[] bytes = Utility.stringToUTF(data);
+// int length = bytes.length;
+//
+// return new Unknown(nameIndex, length, bytes, cp);
+// }
// private LazyClassGen() {}
// public static void main(String[] args) {
// }
// For the entire pathname, we're using package names. This is probably wrong.
- private String getSourceDebugExtensionString() {
- StringBuffer out = new StringBuffer();
- String myFileName = getFileName();
- // header section
- out.append("SMAP\n");
- out.append(myFileName);
- out.append("\nAspectJ\n");
- // stratum section
- out.append("*S AspectJ\n");
- // file section
- out.append("*F\n");
- out.append("1 ");
- out.append(myFileName);
- out.append("\n");
- int i = 2;
- for (Iterator iter = inlinedFiles.keySet().iterator(); iter.hasNext();) {
- String element = (String) iter.next();
- int ii = element.lastIndexOf('/');
- if (ii == -1) {
- out.append(i++); out.append(' ');
- out.append(element); out.append('\n');
- } else {
- out.append("+ "); out.append(i++); out.append(' ');
- out.append(element.substring(ii+1)); out.append('\n');
- out.append(element); out.append('\n');
- }
- }
- // emit line section
- out.append("*L\n");
- out.append("1#1,");
- out.append(highestLineNumber);
- out.append(":1,1\n");
- i = 2;
- for (Iterator iter = inlinedFiles.values().iterator(); iter.hasNext();) {
- InlinedSourceFileInfo element = (InlinedSourceFileInfo) iter.next();
- out.append("1#");
- out.append(i++); out.append(',');
- out.append(element.highestLineNumber); out.append(":");
- out.append(element.offset + 1); out.append(",1\n");
- }
- // end section
- out.append("*E\n");
- // and finish up...
- return out.toString();
- }
+// private String getSourceDebugExtensionString() {
+// StringBuffer out = new StringBuffer();
+// String myFileName = getFileName();
+// // header section
+// out.append("SMAP\n");
+// out.append(myFileName);
+// out.append("\nAspectJ\n");
+// // stratum section
+// out.append("*S AspectJ\n");
+// // file section
+// out.append("*F\n");
+// out.append("1 ");
+// out.append(myFileName);
+// out.append("\n");
+// int i = 2;
+// for (Iterator iter = inlinedFiles.keySet().iterator(); iter.hasNext();) {
+// String element = (String) iter.next();
+// int ii = element.lastIndexOf('/');
+// if (ii == -1) {
+// out.append(i++); out.append(' ');
+// out.append(element); out.append('\n');
+// } else {
+// out.append("+ "); out.append(i++); out.append(' ');
+// out.append(element.substring(ii+1)); out.append('\n');
+// out.append(element); out.append('\n');
+// }
+// }
+// // emit line section
+// out.append("*L\n");
+// out.append("1#1,");
+// out.append(highestLineNumber);
+// out.append(":1,1\n");
+// i = 2;
+// for (Iterator iter = inlinedFiles.values().iterator(); iter.hasNext();) {
+// InlinedSourceFileInfo element = (InlinedSourceFileInfo) iter.next();
+// out.append("1#");
+// out.append(i++); out.append(',');
+// out.append(element.highestLineNumber); out.append(":");
+// out.append(element.offset + 1); out.append(",1\n");
+// }
+// // end section
+// out.append("*E\n");
+// // and finish up...
+// return out.toString();
+// }
// ---- end JSR45-related stuff
if (isSerializable && !hasSerialVersionUIDField) {
getWorld().getLint().serialVersionUIDBroken.signal(
new String[] {
- myType.getResolvedTypeX().getName().toString(),
+ myType.getResolvedTypeX().getName(),
field.getName()
},
sourceLocation,
// OPTIMIZE sort out in here: getRange()/insertHandler() and type of exceptionList
while (iHandle != null) {
Instruction inst = iHandle.getInstruction();
- InstructionHandle nextInst = iHandle.getNext();
+// InstructionHandle nextInst = iHandle.getNext();
// OPTIMIZE remove this instructionhandle as it now points to nowhere?
if (inst == Range.RANGEINSTRUCTION) {
Range r = Range.getRange(iHandle);
gen.addLocalVariable(
tag.getName(),
t,
- tag.getSlot(),(InstructionHandle) start,(InstructionHandle) lvpos.end);
+ tag.getSlot(), start, lvpos.end);
}
}
// }
// }
- private static InstructionHandle fNext(InstructionHandle ih) {
- while (true) {
- if (ih.getInstruction()==Range.RANGEINSTRUCTION) ih = ih.getNext();
- else return ih;
- }
- }
+// private static InstructionHandle fNext(InstructionHandle ih) {
+// while (true) {
+// if (ih.getInstruction()==Range.RANGEINSTRUCTION) ih = ih.getNext();
+// else return ih;
+// }
+// }
private static InstructionHandle remap(InstructionHandle ih, Map map) {
while (true) {
* @Override
*/
protected ReferenceTypeDelegate resolveDelegate(ReferenceType ty) {
- String name = ty.getName();
// use reflection delegates for all bootstrap types
ReferenceTypeDelegate bootstrapLoaderDelegate = resolveIfBootstrapDelegate(ty);
public class AnnotationPointcut extends NameBindingPointcut {
private ExactAnnotationTypePattern annotationTypePattern;
- private ShadowMunger munger = null; // only set after concretization
private String declarationText;
public AnnotationPointcut(ExactAnnotationTypePattern type) {
public AnnotationPointcut(ExactAnnotationTypePattern type, ShadowMunger munger) {
this(type);
- this.munger = munger;
buildDeclarationText();
}
o.formalType.equals(this.formalType);
}
+ public int hashCode() {
+ int result = 19;
+ result = 37*result + formalIndex;
+ result = 37*result + arrayIndex;
+ result = 37*result + formalType.hashCode();
+ return result;
+ }
+
public String toString() {
return "Slot(" + formalIndex + ", " + formalType + ", " + arrayIndex + ")";
}
if (ms[i].isAbstract() && ms[i].getParameterTypes().length==0 && ms[i].getName().equals(k)) {
// we might be onto something
String s= ms[i].getAnnotationDefaultValue();
- if (s!=null && s.equals(v)) foundMatch=true;;
+ if (s!=null && s.equals(v)) foundMatch=true;
}
}
if (!foundMatch)
if (ms[i].isAbstract() && ms[i].getParameterTypes().length==0 && ms[i].getName().equals(k)) {
// we might be onto something
String s= ms[i].getAnnotationDefaultValue();
- if (s!=null && s.equals(v)) foundMatch=true;;
+ if (s!=null && s.equals(v)) foundMatch=true;
}
}
if (!foundMatch)
|| AjcMemberMaker.TYPEX_PROCEEDINGJOINPOINT.getSignature().equals(argSignature)
|| AjcMemberMaker.TYPEX_STATICJOINPOINT.getSignature().equals(argSignature)
|| AjcMemberMaker.TYPEX_ENCLOSINGSTATICJOINPOINT.getSignature().equals(argSignature)) {
- ;
+
} else {
ret.baseArgsCount++;
}
}
private Pointcut parseWithinAnnotationPointcut() {
- String kind = parseIdentifier();
+ /* String kind = */parseIdentifier();
eat("(");
if (maybeEat(")")) {
throw new ParserException("expecting @AnnotationName or parameter, but found ')'", tokenSource.peek());
}
private Pointcut parseWithinCodeAnnotationPointcut() {
- String kind = parseIdentifier();
+ /*String kind = */parseIdentifier();
eat("(");
if (maybeEat(")")) {
throw new ParserException("expecting @AnnotationName or parameter, but found ')'", tokenSource.peek());
/** Covers the 'lock()' and 'unlock()' pointcuts */
private KindedPointcut parseMonitorPointcut(String kind) {
eat("(");
- TypePattern type = TypePattern.ANY;
+// TypePattern type = TypePattern.ANY;
eat(")");
if (kind.equals("lock")) {
// }
- private boolean isAnnotationPattern(PatternNode p) {
- return (p instanceof AnnotationTypePattern);
- }
-
public List parseDottedNamePattern() {
List names = new ArrayList();
StringBuffer buf = new StringBuffer();
public String parseAnnotationNameValuePattern() {
StringBuffer buf = new StringBuffer();
IToken tok;
- int startPos = tokenSource.peek().getStart();
+// int startPos =
+ tokenSource.peek().getStart();
boolean dotOK = false;
int depth = 0;
while (true) {
TypePattern upperBound = null;
TypePattern[] additionalInterfaceBounds = null;
TypePattern lowerBound = null;
- String typeVariableName = null;
- if (typeVariableName == null) typeVariableName = parseIdentifier();
+ String typeVariableName = parseIdentifier();
if (maybeEatIdentifier("extends")) {
upperBound = parseTypePattern();
additionalInterfaceBounds = maybeParseAdditionalInterfaceBounds();
}
protected Test findResidueInternal(Shadow shadow, ExposedState state) {
- Member ptwField = AjcMemberMaker.perTypeWithinField(shadow.getEnclosingType(),inAspect);
+// Member ptwField = AjcMemberMaker.perTypeWithinField(shadow.getEnclosingType(),inAspect);
Expr myInstance =
Expr.makeCallExpr(AjcMemberMaker.perTypeWithinLocalAspectOf(shadow.getEnclosingType(),inAspect/*shadow.getEnclosingType()*/),
return result;
}
- /**
- * Checks pointcuts - used for debugging.
- * - this variant checks if the context has been lost, since
- * that can indicate an NPE will happen later reporting a message (pr162657).
- * Not finished, but helped locate the problem ;)
- */
- private void checkPC(Pointcut pc) {
- if (isNot(pc)) {
- NotPointcut npc = (NotPointcut)pc;
- checkPC(npc.getNegatedPointcut());
- if (npc.getSourceContext()==null) {
- System.out.println("Lost context for "+npc);
- throw new RuntimeException("Lost context");
- }
- } else if (isOr(pc)) {
- OrPointcut opc = (OrPointcut)pc;
- checkPC(opc.getLeft());
- checkPC(opc.getRight());
- if (opc.getSourceContext()==null) {
- System.out.println("Lost context for "+opc);
- throw new RuntimeException("Lost context");
- }
- } else if (isAnd(pc)) {
- AndPointcut apc = (AndPointcut)pc;
- checkPC(apc.getLeft());
- checkPC(apc.getRight());
- if (apc.getSourceContext()==null) {
- System.out.println("Lost context for "+apc);
- throw new RuntimeException("Lost context");
- }
- } else {
- if (pc.getSourceContext()==null) {
- System.out.println("Lost context for "+pc);
- throw new RuntimeException("Lost context");
- }
- }
- }
+// /**
+// * Checks pointcuts - used for debugging.
+// * - this variant checks if the context has been lost, since
+// * that can indicate an NPE will happen later reporting a message (pr162657).
+// * Not finished, but helped locate the problem ;)
+// */
+// private void checkPC(Pointcut pc) {
+// if (isNot(pc)) {
+// NotPointcut npc = (NotPointcut)pc;
+// checkPC(npc.getNegatedPointcut());
+// if (npc.getSourceContext()==null) {
+// System.out.println("Lost context for "+npc);
+// throw new RuntimeException("Lost context");
+// }
+// } else if (isOr(pc)) {
+// OrPointcut opc = (OrPointcut)pc;
+// checkPC(opc.getLeft());
+// checkPC(opc.getRight());
+// if (opc.getSourceContext()==null) {
+// System.out.println("Lost context for "+opc);
+// throw new RuntimeException("Lost context");
+// }
+// } else if (isAnd(pc)) {
+// AndPointcut apc = (AndPointcut)pc;
+// checkPC(apc.getLeft());
+// checkPC(apc.getRight());
+// if (apc.getSourceContext()==null) {
+// System.out.println("Lost context for "+apc);
+// throw new RuntimeException("Lost context");
+// }
+// } else {
+// if (pc.getSourceContext()==null) {
+// System.out.println("Lost context for "+pc);
+// throw new RuntimeException("Lost context");
+// }
+// }
+// }
public Pointcut rewrite(Pointcut pc) {
return rewrite(pc,false);
// }
// }
- private SignaturePattern removeDeclaringTypePattern(SignaturePattern sp) {
- return new SignaturePattern(
- sp.getKind(),
- sp.getModifiers(),
- sp.getReturnType(),
- TypePattern.ANY,
- sp.getName(),
- sp.getParameterTypes(),
- sp.getThrowsPattern(),
- sp.getAnnotationPattern()
- );
- }
+// private SignaturePattern removeDeclaringTypePattern(SignaturePattern sp) {
+// return new SignaturePattern(
+// sp.getKind(),
+// sp.getModifiers(),
+// sp.getReturnType(),
+// TypePattern.ANY,
+// sp.getName(),
+// sp.getParameterTypes(),
+// sp.getThrowsPattern(),
+// sp.getAnnotationPattern()
+// );
+// }
// this finds the root of each && tree and then aggregates all of the branches
// into a sorted set:
return (pc instanceof OrPointcut);
}
- private boolean isExecution(Pointcut pc) {
- if (pc instanceof KindedPointcut) {
- KindedPointcut kp = (KindedPointcut) pc;
- if (kp.kind == Shadow.MethodExecution) return true;
- if (kp.kind == Shadow.ConstructorExecution) return true;
- }
- return false;
- }
-
- private boolean isWithinCode(Pointcut pc) {
- return (pc instanceof WithincodePointcut);
- }
-
- private boolean isAnyType(TypePattern tp) {
- if (tp == TypePattern.ANY) return true;
- if (tp.toString().equals("*")) return true;
- return false;
- }
}
\ No newline at end of file
}
//System.err.println("start: " + searchStart);
- ResolvedType[] parameterTypes = searchStart.getWorld().resolve(pointcutDec.getParameterTypes());
+// ResolvedType[] parameterTypes = searchStart.getWorld().resolve(pointcutDec.getParameterTypes());
TypePatternList arguments = this.arguments.resolveReferences(bindings);
import java.io.DataOutputStream;
import java.io.IOException;
-import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
import org.aspectj.bridge.ISourceLocation;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.reflect.FieldSignature;
-import org.aspectj.lang.reflect.MethodSignature;
import org.aspectj.util.FuzzyBoolean;
-import org.aspectj.weaver.AjAttribute;
+import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.AnnotationTargetKind;
import org.aspectj.weaver.ConcreteTypeMunger;
-import org.aspectj.weaver.Constants;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.JoinPointSignature;
import org.aspectj.weaver.Member;
// relevant member in the original aspect
if (member.isAnnotatedElsewhere() && member.getKind()==Member.FIELD) {
// FIXME asc duplicate of code in AnnotationPointcut.matchInternal()? same fixmes apply here.
- ResolvedMember [] mems = member.getDeclaringType().resolve(world).getDeclaredFields(); // FIXME asc should include supers with getInterTypeMungersIncludingSupers?
+// ResolvedMember [] mems = member.getDeclaringType().resolve(world).getDeclaredFields(); // FIXME asc should include supers with getInterTypeMungersIncludingSupers?
List mungers = member.getDeclaringType().resolve(world).getInterTypeMungers();
for (Iterator iter = mungers.iterator(); iter.hasNext();) {
ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) iter.next();
return false;
}
- private Collection getDeclaringTypes(Signature sig) {
- List l = new ArrayList();
- Class onType = sig.getDeclaringType();
- String memberName = sig.getName();
- if (sig instanceof FieldSignature) {
- Class fieldType = ((FieldSignature)sig).getFieldType();
- Class superType = onType;
- while(superType != null) {
- try {
- Field f = (superType.getDeclaredField(memberName));
- if (f.getType() == fieldType) {
- l.add(superType);
- }
- } catch (NoSuchFieldException nsf) {}
- superType = superType.getSuperclass();
- }
- } else if (sig instanceof MethodSignature) {
- Class[] paramTypes = ((MethodSignature)sig).getParameterTypes();
- Class superType = onType;
- while(superType != null) {
- try {
- superType.getDeclaredMethod(memberName,paramTypes);
- l.add(superType);
- } catch (NoSuchMethodException nsm) {}
- superType = superType.getSuperclass();
- }
- }
- return l;
- }
+// private Collection getDeclaringTypes(Signature sig) {
+// List l = new ArrayList();
+// Class onType = sig.getDeclaringType();
+// String memberName = sig.getName();
+// if (sig instanceof FieldSignature) {
+// Class fieldType = ((FieldSignature)sig).getFieldType();
+// Class superType = onType;
+// while(superType != null) {
+// try {
+// Field f = (superType.getDeclaredField(memberName));
+// if (f.getType() == fieldType) {
+// l.add(superType);
+// }
+// } catch (NoSuchFieldException nsf) {}
+// superType = superType.getSuperclass();
+// }
+// } else if (sig instanceof MethodSignature) {
+// Class[] paramTypes = ((MethodSignature)sig).getParameterTypes();
+// Class superType = onType;
+// while(superType != null) {
+// try {
+// superType.getDeclaredMethod(memberName,paramTypes);
+// l.add(superType);
+// } catch (NoSuchMethodException nsm) {}
+// superType = superType.getSuperclass();
+// }
+// }
+// return l;
+// }
public NamePattern getName() { return name; }
public TypePattern getDeclaringType() { return declaringType; }
* return true if last argument in params is an Object[] but the modifiers say this method
* was declared with varargs (Object...). We shouldn't be matching if this is the case.
*/
- private boolean matchedArrayAgainstVarArgs(TypePatternList params,int modifiers) {
- if (params.size()>0 && (modifiers & Constants.ACC_VARARGS)!=0) {
- // we have at least one parameter in the pattern list, and the method has a varargs signature
- TypePattern lastPattern = params.get(params.size()-1);
- if (lastPattern.isArray() && !lastPattern.isVarArgs) return true;
- }
- return false;
- }
+// private boolean matchedArrayAgainstVarArgs(TypePatternList params,int modifiers) {
+// if (params.size()>0 && (modifiers & Constants.ACC_VARARGS)!=0) {
+// // we have at least one parameter in the pattern list, and the method has a varargs signature
+// TypePattern lastPattern = params.get(params.size()-1);
+// if (lastPattern.isArray() && !lastPattern.isVarArgs) return true;
+// }
+// return false;
+// }
public AnnotationTypePattern getAnnotationPattern() {
return annotationPattern;
private boolean isThis;
private boolean alreadyWarnedAboutDEoW = false;
private ExactAnnotationTypePattern annotationTypePattern;
- private ShadowMunger munger;
private String declarationText;
private static final int thisKindSet;
public ThisOrTargetAnnotationPointcut(boolean isThis, ExactAnnotationTypePattern type, ShadowMunger munger) {
this(isThis,type);
- this.munger = munger;
}
public ExactAnnotationTypePattern getAnnotationTypePattern() {
public abstract FuzzyBoolean matchesInstanceof(ResolvedType type);
public final FuzzyBoolean matches(ResolvedType type, MatchKind kind) {
- FuzzyBoolean typeMatch = null;
+// FuzzyBoolean typeMatch = null;
//??? This is part of gracefully handling missing references
if (type.isMissing()) return FuzzyBoolean.NO;
import java.io.IOException;
import org.aspectj.weaver.ISourceContext;
-import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.VersionedDataInputStream;
public class WithinAnnotationPointcut extends NameBindingPointcut {
private AnnotationTypePattern annotationTypePattern;
- private ShadowMunger munger;
private String declarationText;
/**
public WithinAnnotationPointcut(AnnotationTypePattern type, ShadowMunger munger) {
this(type);
- this.munger = munger;
- this.pointcutKind = ATWITHIN;
+ this.pointcutKind = ATWITHIN;
}
public AnnotationTypePattern getAnnotationTypePattern() {
getSourceLocation()));
return;
}
- annotationTypePattern = (ExactAnnotationTypePattern) annotationTypePattern.resolveBindings(scope,bindings,true);
+ annotationTypePattern = annotationTypePattern.resolveBindings(scope,bindings,true);
// must be either a Var, or an annotation type pattern
}
public static Pointcut read(VersionedDataInputStream s, ISourceContext context) throws IOException {
AnnotationTypePattern type = AnnotationTypePattern.read(s, context);
- WithinAnnotationPointcut ret = new WithinAnnotationPointcut((ExactAnnotationTypePattern)type);
+ WithinAnnotationPointcut ret = new WithinAnnotationPointcut(type);
ret.readLocation(context, s);
return ret;
}
import org.aspectj.bridge.MessageUtil;
import org.aspectj.util.FuzzyBoolean;
-import org.aspectj.weaver.AnnotatedElement;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.IntMap;
public class WithinCodeAnnotationPointcut extends NameBindingPointcut {
private ExactAnnotationTypePattern annotationTypePattern;
- private ShadowMunger munger = null; // only set after concretization
private String declarationText;
private static final int matchedShadowKinds;
public WithinCodeAnnotationPointcut(ExactAnnotationTypePattern type, ShadowMunger munger) {
this(type);
- this.munger = munger;
this.pointcutKind = Pointcut.ATWITHINCODE;
}
* @see org.aspectj.weaver.patterns.Pointcut#match(org.aspectj.weaver.Shadow)
*/
protected FuzzyBoolean matchInternal(Shadow shadow) {
- AnnotatedElement toMatchAgainst = null;
Member member = shadow.getEnclosingCodeSignature();
ResolvedMember rMember = member.resolve(shadow.getIWorld());
}
public boolean handleMessage(IMessage message) throws AbortException {
- boolean result = super.handleMessage(message);
+// boolean result =
+ super.handleMessage(message);
if (abortOnError && 0 <= message.getKind().compareTo(failKind)) {
throw new AbortException(message);
}
}
public void testCommonsTrace() {
- CommonsTrace trace = new CommonsTrace(getClass());
+// CommonsTrace trace =
+ new CommonsTrace(getClass());
}
public void testSetTraceEnabled() {
}
public void testDefaultTrace() {
- DefaultTrace trace = new DefaultTrace(getClass());
+// DefaultTrace trace =
+ new DefaultTrace(getClass());
}
public void testSetTraceEnabled() {
if (f.getType() == String.class) {
try {
String key = (String) f.get(null);
- String value = WeaverMessages.format(key);
+// String value = WeaverMessages.format(key);
assertFalse("Each key should be unique",fieldList.contains(key));
fieldList.add(key);
// System.out.println(key + "," + value);
cSig.formalTypeParameters,
world);
assertEquals("Ljava/lang/Object;",resolved.getSignature());
- UnresolvedType resolvedInt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
+// UnresolvedType resolvedInt =
+ BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[0],
cSig.formalTypeParameters,
world);
System.err.println(rep2.report());
}
- private void loadOnce() throws Exception {
- ClassLoaderRepository rep = setupRepository();
- while (entries.hasMoreElements()) {
- ZipEntry zfe = (ZipEntry) entries.nextElement();
- String classfileName = zfe.getName();
- if (classfileName.endsWith(".class")) {
- String clazzname = classfileName.substring(0,
- classfileName.length() - 6).replace('/', '.');
-
- rep.loadClass(clazzname);
- }
- }
- }
+// private void loadOnce() throws Exception {
+// ClassLoaderRepository rep = setupRepository();
+// while (entries.hasMoreElements()) {
+// ZipEntry zfe = (ZipEntry) entries.nextElement();
+// String classfileName = zfe.getName();
+// if (classfileName.endsWith(".class")) {
+// String clazzname = classfileName.substring(0,
+// classfileName.length() - 6).replace('/', '.');
+//
+// rep.loadClass(clazzname);
+// }
+// }
+// }
public void testMultiThreaded() throws Throwable {
ClassLoaderRepository.useSharedCache=true;
/**
* @author hugunin
*
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
*/
public class AndOrNotTestCase extends TestCase {
/**
super(name);
}
+ static {
+ new Foo();new Bar();new C(); // just to touch them and so eclipse thinks they are used
+ }
World world;
assertEquals("write/read", p, newP);
}
- private static class Foo{};
- private static class Bar{};
- private static class C{};
+ private static class Foo{}
+ private static class Bar{}
+ private static class C{}
}
return false;
}
public boolean isIgnoring(Kind kind) {return false;}
- public void dontIgnore(IMessage.Kind kind) {;}
+ public void dontIgnore(IMessage.Kind kind) {}
public void ignore(Kind kind) {}
}
public void testReferenceToNonAnnotationType() {
- ResolvedType rtx = loadType("AnnotatedClass"); // inits the world
+// ResolvedType rtx =
+ loadType("AnnotatedClass"); // inits the world
PatternParser p = new PatternParser("@java.lang.String");
MyMessageHandler mh = new MyMessageHandler();
}
public void testReferenceViaFormalToNonAnnotationType() {
- ResolvedType rtx = loadType("AnnotatedClass"); // inits the world
+// ResolvedType rtx =
+ loadType("AnnotatedClass"); // inits the world
PatternParser p = new PatternParser("a");
MyMessageHandler mh = new MyMessageHandler();
ap = ap.resolveBindings(makeSimpleScope(),new Bindings(3),true);
AndAnnotationTypePattern atp = (AndAnnotationTypePattern) ap;
NotAnnotationTypePattern notBoo = (NotAnnotationTypePattern) atp.getRight();
- ExactAnnotationTypePattern boo = (ExactAnnotationTypePattern) notBoo.getNegatedPattern();
- AnnotationTypePattern fooOrGoo = (AnnotationTypePattern) atp.getLeft();
+// ExactAnnotationTypePattern boo = (ExactAnnotationTypePattern)
+ notBoo.getNegatedPattern();
+// AnnotationTypePattern fooOrGoo = (AnnotationTypePattern)
+ atp.getLeft();
assertEquals("@((Foo || Goo)) !@Boo",ap.toString());
}
public void testParseNameOrVarAnnotationPattern() {
PatternParser p = new PatternParser("Foo");
AnnotationTypePattern foo = p.parseAnnotationNameOrVarTypePattern();
- assertTrue("ExactAnnotationTypePattern",foo instanceof ExactAnnotationTypePattern);
+ assertTrue("ExactAnnotationTypePattern expected",foo!=null);
assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
}
public void testParseNameOrVarAnnotationPatternWithNot() {
PatternParser p = new PatternParser("!@Foo");
try {
- AnnotationTypePattern bad = p.parseAnnotationNameOrVarTypePattern();
+// AnnotationTypePattern bad =
+ p.parseAnnotationNameOrVarTypePattern();
fail("ParserException expected");
} catch(ParserException pEx) {
assertEquals("identifier",pEx.getMessage());
public void anInt(int i) {}
public void anInteger(Integer i) {}
- };
+ }
private static class B extends A {
public void x(A a) {}
public void y(B b) {}
- };
+ }
private static class C {
public void z(A a, C c) {}
public void t(B b, A a) {}
- };
+ }
private boolean needToSkip = false;
public void testParseExecutionWithMultipleAnnotations() {
PatternParser parser = new PatternParser("execution(@SimpleAnnotation (@Foo Integer) (@Goo Hello).*(..))");
KindedPointcut p = (KindedPointcut) parser.parsePointcut();
- assertEquals("execution(@(SimpleAnnotation) (@(Foo) Integer) (@(Goo) Hello).*(..))",p.toString());;
+ assertEquals("execution(@(SimpleAnnotation) (@(Foo) Integer) (@(Goo) Hello).*(..))",p.toString());
}
public void testParseCallWithMultipleAnnotations() {
PatternParser parser = new PatternParser("call(@SimpleAnnotation (@Foo Integer) (@Goo Hello).*(..))");
KindedPointcut p = (KindedPointcut) parser.parsePointcut();
- assertEquals("call(@(SimpleAnnotation) (@(Foo) Integer) (@(Goo) Hello).*(..))",p.toString());;
+ assertEquals("call(@(SimpleAnnotation) (@(Foo) Integer) (@(Goo) Hello).*(..))",p.toString());
}
public void testParseGetWithAnnotations() {
PatternParser parser = new PatternParser("get(@Foo (@SimpleAnnotation ReturnType) (@Foo @Goo Hello).*)");
KindedPointcut p = (KindedPointcut) parser.parsePointcut();
- assertEquals("get(@(Foo) (@(SimpleAnnotation) ReturnType) (@(Foo) @(Goo) Hello).*)",p.toString());;
+ assertEquals("get(@(Foo) (@(SimpleAnnotation) ReturnType) (@(Foo) @(Goo) Hello).*)",p.toString());
}
public void testParseBadGetWithAnnotations() {
PatternParser parser = new PatternParser("get(@Foo (@Foo @Goo Hello).*)");
try {
- KindedPointcut p = (KindedPointcut) parser.parsePointcut();
+// KindedPointcut p = (KindedPointcut)
+ parser.parsePointcut();
fail("Expected parser exception");
} catch (ParserException pEx) {
assertEquals("name pattern",pEx.getMessage());
public void testParseGetWithAndAggregationAnnotations() {
PatternParser parser = new PatternParser("get(@Foo @SimpleAnnotation ReturnType (@Foo @Goo Hello).*)");
KindedPointcut p = (KindedPointcut) parser.parsePointcut();
- assertEquals("get(@(Foo) @(SimpleAnnotation) ReturnType (@(Foo) @(Goo) Hello).*)",p.toString());;
+ assertEquals("get(@(Foo) @(SimpleAnnotation) ReturnType (@(Foo) @(Goo) Hello).*)",p.toString());
}
public void testParseSetWithAnnotations() {
PatternParser parser = new PatternParser("set(@Foo (@SimpleAnnotation ReturnType) (@Foo @Goo Hello).*)");
KindedPointcut p = (KindedPointcut) parser.parsePointcut();
- assertEquals("set(@(Foo) (@(SimpleAnnotation) ReturnType) (@(Foo) @(Goo) Hello).*)",p.toString());;
+ assertEquals("set(@(Foo) (@(SimpleAnnotation) ReturnType) (@(Foo) @(Goo) Hello).*)",p.toString());
}
public void testParseHandlerWithAnnotations() {
PatternParser parser = new PatternParser("handler(@Critical Exception+)");
Pointcut p = parser.parsePointcut();
- assertEquals("handler((@(Critical) Exception+))",p.toString());;
+ assertEquals("handler((@(Critical) Exception+))",p.toString());
}
public void testParseInitializationWithAnnotations() {
public void testBadAtAnnotation() {
PatternParser parser = new PatternParser("@annotation(!Foo)");
try {
- Pointcut p = parser.parsePointcut();
+// Pointcut p =
+ parser.parsePointcut();
fail("Expected parser exception");
} catch (ParserException pEx) {
assertEquals("identifier",pEx.getMessage());
public void testDoubleAtAnnotation() {
PatternParser parser = new PatternParser("@annotation(Foo Goo)");
try {
- Pointcut p = parser.parsePointcut();
+// Pointcut p =
+ parser.parsePointcut();
fail("Expected parser exception");
} catch (ParserException pEx) {
assertEquals(")",pEx.getMessage());
public void testParseDeclareParentsWithTypeParameterList() {
try {
PatternParser parser = new PatternParser("declare parents<T> : Foo<T> implements IveGoneMad");
- DeclareParents decp = (DeclareParents) parser.parseDeclare();
+ //DeclareParents decp = (DeclareParents)
+ parser.parseDeclare();
// String[] tvp = decp.getTypeParameterNames();
// assertEquals("one type parameter",1,tvp.length);
// assertEquals("expecting T","T",tvp[0]);
public void testParameterizedTypePatternsAny() {
try {
PatternParser parser = new PatternParser("*<T,S extends Number>");
- WildTypePattern wtp = (WildTypePattern) parser.parseTypePattern(false,false);
+// WildTypePattern wtp = (WildTypePattern)
+ parser.parseTypePattern(false,false);
// TypePatternList tvs = wtp.getTypeParameters();
// assertEquals("2 type parameters",2,tvs.getTypePatterns().length);
// assertEquals("T",new PatternParser("T").parseTypePattern(),tvs.getTypePatterns()[0]);
public void testSimpleTypeVariableListError() {
PatternParser parser = new PatternParser("<T extends Number>");
try {
- String[] tl = parser.maybeParseSimpleTypeVariableList();
+// String[] tl =
+ parser.maybeParseSimpleTypeVariableList();
+ fail();
} catch (ParserException ex) {
assertEquals("Expecting ',' or '>'","',' or '>'",ex.getMessage());
}
public void testParseCallPCDWithTypeVariables() {
PatternParser parser = new PatternParser("call<T>(* Foo<T>.*(T))");
try {
- Pointcut pc = parser.parsePointcut();
+ parser.parsePointcut();
// String[] tvps = pc.getTypeVariablesInScope();
// assertEquals("1 type variable",1,tvps.length);
// assertEquals("T",tvps[0]);
public void testExecutionWithTypeVariables() {
PatternParser parser = new PatternParser("execution<T>(T Bar<T>.doSomething())");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("initialization<T>(Bar<T>.new())");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testPreInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("preinitialization<T>(Bar<T>.new())");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testStaticInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("staticinitialization<T>(Bar<T>)");
try {
- Pointcut pc = parser.parsePointcut();
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testWithinWithTypeVariables() {
PatternParser parser = new PatternParser("within<T>(Bar<T>)");
try {
- Pointcut pc = parser.parsePointcut();
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testTypeParamList() {
PatternParser parser = new PatternParser("Bar<T,S extends T, R extends S>");
try {
- TypePattern tp = parser.parseTypePattern(false,false);
+ parser.parseTypePattern(false,false);
// TypePattern[] tps = tp.getTypeParameters().getTypePatterns();
// assertEquals("3 type patterns",3,tps.length);
// assertEquals("T",tps[0].toString());
public void testWithinCodeWithTypeVariables() {
PatternParser parser = new PatternParser("withincode<T,S,R>(Bar<T,S extends T, R extends S>.new())");
try {
- Pointcut pc = parser.parsePointcut();
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("3 type patterns",3,tvs.length);
// assertEquals("T",tvs[0]);
public void testCallWithTypeVariables() {
PatternParser parser = new PatternParser("call<T>(* Bar<T>.*(..))");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testGetWithTypeVariables() {
PatternParser parser = new PatternParser("get<T>(* Bar<T>.*)");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testSetWithTypeVariables() {
PatternParser parser = new PatternParser("set<T>(* Bar<T>.*)");
try {
- Pointcut pc = parser.parsePointcut();
+// Pointcut pc =
+ parser.parsePointcut();
// String[] tvs = pc.getTypeVariablesInScope();
// assertEquals("1 type pattern",1,tvs.length);
// assertEquals("T",tvs[0]);
public void testNotRemoveNearlyDuplicatesInAnd() {
Pointcut toAndto = getPointcut("this(Object+) && this(Object)");
- Pointcut rewritten = prw.rewrite(toAndto);
+// Pointcut rewritten =
+ prw.rewrite(toAndto);
}
public void testAAndNotAinAnd() {
assertEquals("Ljava/util/List;",rt.getSignature());
assertTrue(rt.isRawType());
- ExactTypePattern etp = (ExactTypePattern) writeAndRead((ExactTypePattern)rtp);
+ ExactTypePattern etp = (ExactTypePattern) writeAndRead(rtp);
exactType = etp.getExactType();
assertEquals("Ljava/util/List;",exactType.getSignature());
assertEquals("Pjava/util/List<Ljava/lang/String;>;",rt.getSignature());
assertTrue(rt.isParameterizedType());
- ExactTypePattern etp = (ExactTypePattern) writeAndRead((ExactTypePattern)rtp);
+ ExactTypePattern etp = (ExactTypePattern) writeAndRead(rtp);
exactType = etp.getExactType();
assertEquals("Pjava/util/List<Ljava/lang/String;>;",rt.getSignature());
// public void testBean1SetAge() { }
// This should be found and resolved
- PointcutExpression pc = parser.parsePointcutExpression("CounterAspect.testBean1SetAge()");
+// PointcutExpression pc =
+ parser.parsePointcutExpression("CounterAspect.testBean1SetAge()");
}