]> source.dussan.org Git - aspectj.git/commitdiff
231396: Comment #4: Big Refactoring
authoraclement <aclement>
Wed, 28 May 2008 23:53:38 +0000 (23:53 +0000)
committeraclement <aclement>
Wed, 28 May 2008 23:53:38 +0000 (23:53 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseAnnotationConvertor.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseResolvedMember.java

index c10639409654cb76dbf60619e4587d1fc5651d27..dac05522c695ff2d721b0aeb7a80c420ef75ed34 100644 (file)
@@ -11,8 +11,7 @@
  * ******************************************************************/
 package org.aspectj.ajdt.internal.compiler.lookup;
 
-import org.aspectj.apache.bcel.classfile.annotation.ElementValue;
-import org.aspectj.apache.bcel.classfile.annotation.SimpleElementValue;
+import org.aspectj.apache.bcel.classfile.annotation.ElementValueGen;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ArrayInitializer;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression;
@@ -21,9 +20,9 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.NormalAnnotation;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
+import org.aspectj.org.eclipse.jdt.internal.compiler.impl.BooleanConstant;
 import org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.aspectj.org.eclipse.jdt.internal.compiler.impl.IntConstant;
-import org.aspectj.org.eclipse.jdt.internal.compiler.impl.BooleanConstant;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TagBits;
@@ -144,10 +143,10 @@ public class EclipseAnnotationConvertor {
                        Constant c = defaultValue.constant;
                        if (c instanceof IntConstant) {
                                IntConstant iConstant = (IntConstant)c;
-                               return new SimpleAnnotationValue(ElementValue.PRIMITIVE_INT,new Integer(iConstant.intValue()));
+                               return new SimpleAnnotationValue(ElementValueGen.PRIMITIVE_INT,new Integer(iConstant.intValue()));
                        } else if (c instanceof BooleanConstant) {
                                BooleanConstant iConstant = (BooleanConstant)c;
-                               return new SimpleAnnotationValue(ElementValue.PRIMITIVE_BOOLEAN,new Boolean(iConstant.booleanValue()));
+                               return new SimpleAnnotationValue(ElementValueGen.PRIMITIVE_BOOLEAN,new Boolean(iConstant.booleanValue()));
                        }
                }
                return null;
index fd54e98508f42d8455f2b4579de81bdb2a9044f2..f00b0b27712201b5c82a01a3c14dbe7ffbbfc8de 100644 (file)
@@ -56,6 +56,7 @@ import org.aspectj.weaver.BoundedReferenceType;
 import org.aspectj.weaver.ConcreteTypeMunger;
 import org.aspectj.weaver.IHasPosition;
 import org.aspectj.weaver.Member;
+import org.aspectj.weaver.MemberKind;
 import org.aspectj.weaver.NameMangler;
 import org.aspectj.weaver.NewFieldTypeMunger;
 import org.aspectj.weaver.NewMethodTypeMunger;
@@ -460,7 +461,7 @@ public class EclipseFactory {
        }
 
        public ResolvedMember makeResolvedMember(MethodBinding binding, Shadow.Kind shadowKind) {
-               Member.Kind memberKind = binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD;
+               MemberKind memberKind = binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD;
                if (shadowKind == Shadow.AdviceExecution) memberKind = Member.ADVICE;
                return makeResolvedMember(binding,binding.declaringClass,memberKind);
        }
@@ -503,7 +504,7 @@ public class EclipseFactory {
                                binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD);
        }
 
-       public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType, Member.Kind memberKind) {
+       public ResolvedMember makeResolvedMember(MethodBinding binding, TypeBinding declaringType, MemberKind memberKind) {
                //System.err.println("member for: " + binding + ", " + new String(binding.declaringClass.sourceName));
 
         // Convert the type variables and store them
index b2c0e9ec7ae6a82e7956f6152e13cd69b6efce5b..c0eaaf4a5f36a95915dde0991df7230e7194b0dc 100644 (file)
@@ -24,6 +24,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
 import org.aspectj.weaver.AnnotationX;
+import org.aspectj.weaver.MemberKind;
 import org.aspectj.weaver.ResolvedMemberImpl;
 import org.aspectj.weaver.ResolvedType;
 import org.aspectj.weaver.UnresolvedType;
@@ -45,14 +46,14 @@ public class EclipseResolvedMember extends ResolvedMemberImpl {
        private ResolvedType[] cachedAnnotationTypes;
        private EclipseFactory eclipseFactory;
        
-       public EclipseResolvedMember(MethodBinding binding, Kind memberKind, ResolvedType realDeclaringType, int modifiers, UnresolvedType type, String string, UnresolvedType[] types, UnresolvedType[] types2, EclipseFactory eclipseFactory) {
+       public EclipseResolvedMember(MethodBinding binding, MemberKind memberKind, ResolvedType realDeclaringType, int modifiers, UnresolvedType type, String string, UnresolvedType[] types, UnresolvedType[] types2, EclipseFactory eclipseFactory) {
                super(memberKind,realDeclaringType,modifiers,type,string,types,types2);
                this.realBinding = binding;
                this.eclipseFactory = eclipseFactory;
                this.w = realDeclaringType.getWorld();
        }
 
-       public EclipseResolvedMember(FieldBinding binding, Kind field, ResolvedType realDeclaringType, int modifiers, ResolvedType type, String string, UnresolvedType[] none) {
+       public EclipseResolvedMember(FieldBinding binding, MemberKind field, ResolvedType realDeclaringType, int modifiers, ResolvedType type, String string, UnresolvedType[] none) {
                super(field,realDeclaringType,modifiers,type,string,none);
                this.realBinding = binding;
                this.w = realDeclaringType.getWorld();