/**
* The version number of this release.
*/
- public static final String version = "3.5GA";
+ public static final String version = "3.6.0BETA";
/**
* Prints the version number and the copyright notice.
*/
public static void main(String[] args) {
System.out.println("Javassist version " + CtClass.version);
- System.out.println("Copyright (C) 1999-2006 Shigeru Chiba."
+ System.out.println("Copyright (C) 1999-2007 Shigeru Chiba."
+ " All Rights Reserved.");
}
}
checkModify();
- int acc = AccessFlag.of(mod) | AccessFlag.SUPER;
- cf.setAccessFlags(acc);
+ cf.setAccessFlags(AccessFlag.of(mod));
}
public Object[] getAnnotations() throws ClassNotFoundException {
constPool = new ConstPool(classname);
thisClass = constPool.getThisClassInfo();
if (isInterface)
- accessFlags = AccessFlag.SUPER | AccessFlag.INTERFACE
- | AccessFlag.ABSTRACT;
+ accessFlags = AccessFlag.INTERFACE | AccessFlag.ABSTRACT;
else
accessFlags = AccessFlag.SUPER;
* @see javassist.bytecode.AccessFlag
*/
public void setAccessFlags(int acc) {
- accessFlags = acc | AccessFlag.SUPER;
+ if ((acc & AccessFlag.INTERFACE) == 0)
+ acc |= AccessFlag.SUPER;
+
+ accessFlags = acc;
}
/**
int mod
= AccessFlag.toModifier(cf.getAccessFlags()
& ~AccessFlag.SYNCHRONIZED);
- out.println("major: " + cf.major + ", minor: " + cf.minor);
+ out.println("major: " + cf.major + ", minor: " + cf.minor
+ + "modifiers: " + Integer.toHexString(cf.getAccessFlags()));
out.println(Modifier.toString(mod) + " class "
+ cf.getName() + " extends " + cf.getSuperclass());