aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/bytecode')
-rw-r--r--src/main/javassist/bytecode/ClassFile.java8
-rw-r--r--src/main/javassist/bytecode/ClassFileWriter.java3
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java
index 82221d45..50b6cacd 100644
--- a/src/main/javassist/bytecode/ClassFile.java
+++ b/src/main/javassist/bytecode/ClassFile.java
@@ -68,8 +68,7 @@ public final class ClassFile {
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;
@@ -237,7 +236,10 @@ public final class ClassFile {
* @see javassist.bytecode.AccessFlag
*/
public void setAccessFlags(int acc) {
- accessFlags = acc | AccessFlag.SUPER;
+ if ((acc & AccessFlag.INTERFACE) == 0)
+ acc |= AccessFlag.SUPER;
+
+ accessFlags = acc;
}
/**
diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java
index 2d667a86..b4f83895 100644
--- a/src/main/javassist/bytecode/ClassFileWriter.java
+++ b/src/main/javassist/bytecode/ClassFileWriter.java
@@ -45,7 +45,8 @@ public class ClassFileWriter {
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());