public final static short ACC_ABSTRACT = 0x0400; | public final static short ACC_ABSTRACT = 0x0400; | ||||
public final static short ACC_STRICT = 0x0800; | public final static short ACC_STRICT = 0x0800; | ||||
public final static short ACC_SYNTHETIC = 0x1000; | |||||
public final static short ACC_ANNOTATION = 0x2000; | public final static short ACC_ANNOTATION = 0x2000; | ||||
public final static short ACC_ENUM = 0x4000; | public final static short ACC_ENUM = 0x4000; | ||||
public final static short ACC_BRIDGE = 0x0040; | public final static short ACC_BRIDGE = 0x0040; |
} | } | ||||
// The bridge method in this type will have the same signature as the one in the supertype | // The bridge method in this type will have the same signature as the one in the supertype | ||||
LazyMethodGen bridgeMethod = makeBridgeMethod(clazz, theBridgeMethod); | LazyMethodGen bridgeMethod = makeBridgeMethod(clazz, theBridgeMethod); | ||||
int newflags = bridgeMethod.getAccessFlags() | 0x00000040;// BRIDGE = 0x00000040 | |||||
int newflags = bridgeMethod.getAccessFlags() | Constants.ACC_BRIDGE | Constants.ACC_SYNTHETIC ;// BRIDGE = 0x00000040 | |||||
if ((newflags & 0x00000100) != 0) { | if ((newflags & 0x00000100) != 0) { | ||||
newflags = newflags - 0x100;// NATIVE = 0x00000100 - need to clear it | newflags = newflags - 0x100;// NATIVE = 0x00000100 - need to clear it |
* We stay away from targeters for rangey things like Shadows and Exceptions. | * We stay away from targeters for rangey things like Shadows and Exceptions. | ||||
*/ | */ | ||||
public final class LazyMethodGen implements Traceable { | public final class LazyMethodGen implements Traceable { | ||||
private static final int ACC_SYNTHETIC = 0x1000; | |||||
private int modifiers; | private int modifiers; | ||||
private Type returnType; | private Type returnType; | ||||
if (isSynthetic) { | if (isSynthetic) { | ||||
if (enclosingClass.getWorld().isInJava5Mode()) { | if (enclosingClass.getWorld().isInJava5Mode()) { | ||||
gen.setModifiers(gen.getModifiers() | ACC_SYNTHETIC); | |||||
gen.setModifiers(gen.getModifiers() | Constants.ACC_SYNTHETIC); | |||||
} | } | ||||
if (!hasAttribute("Synthetic")) { | if (!hasAttribute("Synthetic")) { | ||||
// belt and braces, do the attribute even on Java 5 in addition to the modifier flag | // belt and braces, do the attribute even on Java 5 in addition to the modifier flag |