diff options
author | aclement <aclement> | 2008-06-06 00:24:30 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-06 00:24:30 +0000 |
commit | 7f4f64f7e9306073a5f0676e3bb925b62f4c94d8 (patch) | |
tree | 72d253a75009d94bf363682b1d525f13aa687ea9 | |
parent | 0fe881dc527459faa5dfdf032416d4d8bf769124 (diff) | |
download | aspectj-7f4f64f7e9306073a5f0676e3bb925b62f4c94d8.tar.gz aspectj-7f4f64f7e9306073a5f0676e3bb925b62f4c94d8.zip |
231396: refactoring AspectJ: reduced unnecessary sig parsing from strings
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java b/weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java index 989c65e59..af0ee8d5b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelRenderer.java @@ -23,6 +23,7 @@ import org.aspectj.apache.bcel.generic.Type; import org.aspectj.weaver.BCException; import org.aspectj.weaver.Member; import org.aspectj.weaver.MemberImpl; +import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.ast.And; import org.aspectj.weaver.ast.Call; @@ -188,15 +189,14 @@ public final class BcelRenderer implements ITestVisitor, IExprVisitor { // ldc_w annotationClass // invokevirtual java/lang/Class.isAnnotationPresent:(Ljava/lang/Class;)Z InstructionList il = new InstructionList(); - Member getClass = MemberImpl.method(UnresolvedType.OBJECT, 0, "getClass", "()Ljava/lang/Class;"); + 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)); - Member isAnnotationPresent = MemberImpl.method(UnresolvedType.forName("java/lang/Class"),0, - "isAnnotationPresent","(Ljava/lang/Class;)Z"); + Member isAnnotationPresent = MemberImpl.method(UnresolvedType.JAVA_LANG_CLASS,0,ResolvedType.BOOLEAN,"isAnnotationPresent",new UnresolvedType[]{UnresolvedType.JAVA_LANG_CLASS}); il.append(Utility.createInvoke(fact,world,isAnnotationPresent)); il.append(createJumpBasedOnBooleanOnStack()); instructions.insert(il); |