diff options
author | aclement <aclement> | 2008-05-28 23:53:31 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-05-28 23:53:31 +0000 |
commit | c25f60966bdf738b6430c248bed7cf917e847a96 (patch) | |
tree | 72da4340e815bc03e28c64b931bc96ad8c912bc0 /loadtime | |
parent | 43bbb31cf8997747a36eb7a2153aefd4bd10c741 (diff) | |
download | aspectj-c25f60966bdf738b6430c248bed7cf917e847a96.tar.gz aspectj-c25f60966bdf738b6430c248bed7cf917e847a96.zip |
231396: Comment #4: Big Refactoring
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 7 | ||||
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java | 28 |
2 files changed, 15 insertions, 20 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 3dd07c694..3dd748a7b 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -146,12 +146,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { bcelWorld = new LTWWorld( classLoader, weavingContext, // TODO when the world works in terms of the context, we can remove the loader... - getMessageHandler(), new ICrossReferenceHandler() { - public void addCrossReference(ISourceLocation from, ISourceLocation to, IRelationship.Kind kind, boolean runtimeTest) { - ;// for tools only - } - } - ); + getMessageHandler(), null); weaver = new BcelWeaver(bcelWorld); diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java index 89dc420fb..08f52664d 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java @@ -13,14 +13,14 @@ package org.aspectj.weaver.loadtime; import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.JavaClass; +import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; +import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen; +import org.aspectj.apache.bcel.classfile.annotation.ElementValueGen; +import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValueGen; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.apache.bcel.generic.InstructionList; import org.aspectj.apache.bcel.generic.ObjectType; import org.aspectj.apache.bcel.generic.Type; -import org.aspectj.apache.bcel.generic.annotation.AnnotationGen; -import org.aspectj.apache.bcel.generic.annotation.ElementNameValuePairGen; -import org.aspectj.apache.bcel.generic.annotation.ElementValueGen; -import org.aspectj.apache.bcel.generic.annotation.SimpleElementValueGen; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.Message; import org.aspectj.weaver.AnnotationX; @@ -303,24 +303,24 @@ public class ConcreteAspectCodeGen { new ObjectType("org/aspectj/lang/annotation/Aspect"), Collections.EMPTY_LIST, true, - cg.getConstantPoolGen() + cg.getConstantPool() ); - cg.addAnnotation(ag.getAnnotation()); + cg.addAnnotation(ag); if (m_concreteAspect.precedence != null) { SimpleElementValueGen svg = new SimpleElementValueGen( ElementValueGen.STRING, - cg.getConstantPoolGen(), + cg.getConstantPool(), m_concreteAspect.precedence ); List elems = new ArrayList(); - elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPoolGen())); + elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPool())); AnnotationGen agprec = new AnnotationGen( new ObjectType("org/aspectj/lang/annotation/DeclarePrecedence"), elems, true, - cg.getConstantPoolGen() + cg.getConstantPool() ); - cg.addAnnotation(agprec.getAnnotation()); + cg.addAnnotation(agprec); } // default constructor @@ -357,18 +357,18 @@ public class ConcreteAspectCodeGen { ); SimpleElementValueGen svg = new SimpleElementValueGen( ElementValueGen.STRING, - cg.getConstantPoolGen(), + cg.getConstantPool(), abstractPc.expression ); List elems = new ArrayList(); - elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPoolGen())); + elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPool())); AnnotationGen mag = new AnnotationGen( new ObjectType("org/aspectj/lang/annotation/Pointcut"), elems, true, - cg.getConstantPoolGen() + cg.getConstantPool() ); - AnnotationX max = new AnnotationX(mag.getAnnotation(), m_world); + AnnotationX max = new AnnotationX(mag, m_world); mg.addAnnotation(max); InstructionList body = mg.getBody(); |