diff options
author | aclement <aclement> | 2009-11-19 17:32:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-11-19 17:32:04 +0000 |
commit | 4b627b68d078ca1ac24bdf9bb6fd0913b8068f2b (patch) | |
tree | e5aa2fad8b031e9822b4000faaa7e930bd4861ad /weaver | |
parent | 534ef931bf656e86114044594504b21667bc42e7 (diff) | |
download | aspectj-4b627b68d078ca1ac24bdf9bb6fd0913b8068f2b.tar.gz aspectj-4b627b68d078ca1ac24bdf9bb6fd0913b8068f2b.zip |
avoid using helpers on Member hierarchy
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 1f841ed37..d5fa8c882 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -414,12 +414,13 @@ public class BcelTypeMunger extends ConcreteTypeMunger { */ private boolean enforceDecpRule5_cantChangeFromStaticToNonstatic(BcelClassWeaver weaver, ISourceLocation mungerLoc, ResolvedMember superMethod, LazyMethodGen subMethod) { - if (superMethod.isStatic() && !subMethod.isStatic()) { + boolean superMethodStatic = Modifier.isStatic(superMethod.getModifiers()); + if (superMethodStatic && !subMethod.isStatic()) { error(weaver, "This instance method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot override the static method from " + superMethod.getDeclaringType().getName(), subMethod .getSourceLocation(), new ISourceLocation[] { mungerLoc }); return false; - } else if (!superMethod.isStatic() && subMethod.isStatic()) { + } else if (!superMethodStatic && subMethod.isStatic()) { error(weaver, "The static method " + subMethod.getName() + subMethod.getParameterSignature() + " cannot hide the instance method from " + superMethod.getDeclaringType().getName(), subMethod .getSourceLocation(), new ISourceLocation[] { mungerLoc }); @@ -963,7 +964,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { InstructionFactory fact = classGen.getFactory(); int pos = 0; - if (!mangledInterMethod.isStatic()) { + if (!Modifier.isStatic(mangledInterMethod.getModifiers())) { body.append(InstructionFactory.createThis()); pos++; } @@ -1375,7 +1376,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // args int pos = 0; - if (!introduced.isStatic()) { // skip 'this' (?? can this really + if (!Modifier.isStatic(introduced.getModifiers())) { // skip 'this' (?? can this really // happen) // body.append(InstructionFactory.createThis()); pos++; @@ -1852,7 +1853,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { ResolvedMember itdfieldSetter = AjcMemberMaker.interFieldInterfaceSetter(field, gen.getType(), aspectType); LazyMethodGen mg1 = makeMethodGen(gen, itdfieldSetter); InstructionList il1 = new InstructionList(); - if (field.isStatic()) { + if (Modifier.isStatic(field.getModifiers())) { il1.append(InstructionFactory.createLoad(fieldType, 0)); il1.append(fact.createFieldAccess(gen.getClassName(), fg.getName(), fieldType, Constants.PUTSTATIC)); } else { |