]> source.dussan.org Git - aspectj.git/commitdiff
avoid using helpers on Member hierarchy
authoraclement <aclement>
Thu, 19 Nov 2009 17:06:37 +0000 (17:06 +0000)
committeraclement <aclement>
Thu, 19 Nov 2009 17:06:37 +0000 (17:06 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java

index 32333c2041907368d082a1f151bfcf4bcf18b3dd..ee09268a30076e30e575184eebe4f610ef427062 100644 (file)
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.aspectj.weaver.bcel;
 
+import java.lang.reflect.Modifier;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -256,8 +257,8 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger {
                                il.append(InstructionFactory.createLoad(type, register));
                                register += type.getSize();
                        }
-                       il.append(Utility.createInvoke(factory, resolvedMember.isStatic() ? Constants.INVOKESTATIC : Constants.INVOKESPECIAL,
-                                       resolvedMember));
+                       il.append(Utility.createInvoke(factory, Modifier.isStatic(resolvedMember.getModifiers()) ? Constants.INVOKESTATIC
+                                       : Constants.INVOKESPECIAL, resolvedMember));
                        il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(inlineAccessor.getReturnType())));
 
                        m_inlineAccessorBcelMethods.put(accessor, new BcelMethod(m_aspectGen.getBcelObjectType(), method.getMethod()));
@@ -334,7 +335,7 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger {
                        m_inlineAccessorMethodGens.add(method);
 
                        InstructionList il = method.getBody();
-                       if (resolvedMember.isStatic()) {
+                       if (Modifier.isStatic(resolvedMember.getModifiers())) {
                                // field accessed is static so no "this" as accessor sole parameter
                        } else {
                                il.append(InstructionConstants.ALOAD_0);
@@ -374,7 +375,7 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger {
                        m_inlineAccessorMethodGens.add(method);
 
                        InstructionList il = method.getBody();
-                       if (resolvedMember.isStatic()) {
+                       if (Modifier.isStatic(resolvedMember.getModifiers())) {
                                // field accessed is static so sole parameter is field value to be set
                                il.append(InstructionFactory.createLoad(BcelWorld.makeBcelType(resolvedMember.getReturnType()), 0));
                        } else {