// }
declaringType = declaringType.resolve(w);
if (declaringType.isRawType()) declaringType = ((ResolvedType)declaringType).getGenericType();
- TypeVariable[] typeVariables = getDeclaringType().getTypeVariables();
+// TypeVariable[] typeVariables = getDeclaringType().getTypeVariables();
// if (isParameterized && (typeVariables.length != typeParameters.length)) {
// throw new IllegalStateException("Wrong number of type parameters supplied");
// }
// if (!(getDeclaringType() instanceof ResolvedType)) {
// int stop = 1;
// }
- if (aType instanceof UnresolvedType) {
+// if (aType!=null) {// instanceof UnresolvedType) {
if (w!=null) aType = aType.resolve(w);
else {
aType= aType.resolve(((ResolvedType)getDeclaringType()).getWorld());
}
- }
+// }
return aType.parameterize(typeVariableMap);
} else {
return aType.getRawType();
return false;//stop
}
} else {
- if (pointcutExpr==null || (pointcutExpr != null && isNullOrEmpty(pointcutExpr.getValue().stringifyValue()))) {
+ if (pointcutExpr==null || isNullOrEmpty(pointcutExpr.getValue().stringifyValue())) {
// the matches nothing pointcut (125475/125480) - perhaps not as cleanly supported as it could be.
} else {
- if (pointcutExpr != null) {
+// if (pointcutExpr != null) {
// use a LazyResolvedPointcutDefinition so that the pointcut is resolved lazily
// since for it to be resolved, we will need other pointcuts to be registered as well
pc = parsePointcut(pointcutExpr.getValue().stringifyValue(), struct, true);
if (pc == null) return false;//parse error
pc.setLocation(struct.context, -1, -1);//FIXME AVASM !! bMethod is null here..
- } else {
- reportError("Found undefined @Pointcut on a non-abstract method", struct);
- return false;
- }
+// } else {
+// reportError("Found undefined @Pointcut on a non-abstract method", struct);
+// return false;
+// }
}
}
// do not resolve binding now but lazily
for (int ii = 0;ii<originalParams.length;ii++) {
if (!originalParams[ii].getErasureSignature().equals(newParams[ii].getErasureSignature())) needsbridging=true;
}
- if (toBridgeTo!=null && needsbridging) {
+ if (needsbridging) {
ResolvedMember bridgerMethod = AjcMemberMaker.bridgerToInterMethod(unMangledInterMethod,gen.getType());
ResolvedMember bridgingSetter = AjcMemberMaker.interMethod(toBridgeTo, aspectType, false);
private AnnotationFinder annotationFinder;
private ReflectionWorld() {
- super();
- this.setMessageHandler(new ExceptionBasedMessageHandler());
- setBehaveInJava5Way(LangUtil.is15VMOrGreater());
- this.classLoaderReference = new WeakClassLoaderReference(ReflectionWorld.class.getClassLoader());
- this.annotationFinder = makeAnnotationFinderIfAny(classLoaderReference.getClassLoader(), this);
+// super();
+// this.setMessageHandler(new ExceptionBasedMessageHandler());
+// setBehaveInJava5Way(LangUtil.is15VMOrGreater());
+// this.classLoaderReference = new WeakClassLoaderReference(ReflectionWorld.class.getClassLoader());
+// this.annotationFinder = makeAnnotationFinderIfAny(classLoaderReference.getClassLoader(), this);
}
public ReflectionWorld(ClassLoader aClassLoader) {
assertTrue("Expected parameterization flag to be "+shouldBeParameterized,tx.isParameterizedType()==shouldBeParameterized);
if (numberOfTypeParameters==0) {
UnresolvedType[] params = tx.getTypeParameters();
- assertTrue("Expected 0 type parameters but found "+params.length,params==null || params.length==0);
+ assertTrue("Expected 0 type parameters but found "+params.length, params.length==0);
} else {
assertTrue("Expected #type parameters to be "+numberOfTypeParameters,tx.getTypeParameters().length==numberOfTypeParameters);
}
public void testParseBadPattern() {
PatternParser p = new PatternParser("@@Foo");
try {
- AnnotationTypePattern bad = p.maybeParseAnnotationPattern();
+ p.maybeParseAnnotationPattern();
fail("ParserException expected");
} catch(ParserException pEx) {
assertEquals("name pattern",pEx.getMessage());