diff options
Diffstat (limited to 'src/main/javassist/bytecode/ClassFile.java')
-rw-r--r-- | src/main/javassist/bytecode/ClassFile.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index 50b6cacd..e28e6c63 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -46,6 +46,12 @@ public final class ClassFile { String cachedSuperclass; /** + * The major version number of class files created + * from scratch. The value is 45 (JDK 1.1). + */ + public static final int MAJOR_VERSION = 45; + + /** * Constructs a class file from a byte stream. */ public ClassFile(DataInputStream in) throws IOException { @@ -63,7 +69,7 @@ public final class ClassFile { * a fully-qualified super class name */ public ClassFile(boolean isInterface, String classname, String superclass) { - major = 45; + major = MAJOR_VERSION; minor = 3; // JDK 1.1 or later constPool = new ConstPool(classname); thisClass = constPool.getThisClassInfo(); |