]> source.dussan.org Git - aspectj.git/commitdiff
avoid using helpers on Member hierarchy
authoraclement <aclement>
Tue, 17 Nov 2009 18:36:33 +0000 (18:36 +0000)
committeraclement <aclement>
Tue, 17 Nov 2009 18:36:33 +0000 (18:36 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
weaver/src/org/aspectj/weaver/bcel/Utility.java

index e52ab22ebd1eea058ec9f18e289c6773d4b0be44..2c82109615b5023ef4ffc3aa0c9ef465550ca6cd 100644 (file)
@@ -354,14 +354,14 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
        private boolean enforceDecpRule3_visibilityChanges(BcelClassWeaver weaver, ResolvedType newParent, ResolvedMember superMethod,
                        LazyMethodGen subMethod) {
                boolean cont = true;
-               if (superMethod.isPublic()) {
+               if (Modifier.isPublic(superMethod.getModifiers())) {
                        if (subMethod.isProtected() || subMethod.isDefault() || subMethod.isPrivate()) {
                                weaver.getWorld().getMessageHandler().handleMessage(
                                                MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from "
                                                                + newParent.getName(), superMethod.getSourceLocation()));
                                cont = false;
                        }
-               } else if (superMethod.isProtected()) {
+               } else if (Modifier.isProtected(superMethod.getModifiers())) {
                        if (subMethod.isDefault() || subMethod.isPrivate()) {
                                weaver.getWorld().getMessageHandler().handleMessage(
                                                MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from "
index 8c62a9777c3d15fe99e2e0d2171d7bdc62f72256..175041229638bbec9c266038569954b1571f400c 100644 (file)
@@ -552,7 +552,7 @@ public class BcelWorld extends World implements Repository {
                        // look for the method there
                        for (Iterator<ResolvedMember> iterator = appearsDeclaredBy.getMethods(true, true); iterator.hasNext();) {
                                ResolvedMember method = iterator.next();
-                               if (method.isStatic()) {
+                               if (Modifier.isStatic(method.getModifiers())) {
                                        if (name.equals(method.getName()) && signature.equals(method.getSignature())) {
                                                // we found it
                                                declaringType = method.getDeclaringType();
index 51ad90d1f5851b7bfe55f1d9be948b11b4e3da2c..6ae91ee69b70127880e49ca1090c798fab9ab2a1 100644 (file)
@@ -320,7 +320,7 @@ public final class LazyClassGen {
                ResolvedMember[] fields = type.getDeclaredFields();
                for (int i = 0; i < fields.length; i++) {
                        ResolvedMember field = fields[i];
-                       if (field.getName().equals("serialVersionUID") && field.isStatic() && field.getType().equals(ResolvedType.LONG)) {
+                       if (field.getName().equals("serialVersionUID") && Modifier.isStatic(field.getModifiers()) && field.getType().equals(ResolvedType.LONG)) {
                                return true;
                        }
                }
index e5a760339a8d17ab4313f5429666ff158d078125..70f01234ec8b66934d8c2e0d60173382340d9478 100644 (file)
@@ -178,7 +178,7 @@ public class Utility {
 
        public static Instruction createSet(InstructionFactory fact, Member signature) {
                short kind;
-               if (signature.isStatic()) {
+               if (Modifier.isStatic(signature.getModifiers())) {
                        kind = Constants.PUTSTATIC;
                } else {
                        kind = Constants.PUTFIELD;