From dfd5230a6eeae9fdc3debc3db26634db3062aa2d Mon Sep 17 00:00:00 2001 From: chibash Date: Thu, 14 Jul 2016 12:56:05 +0900 Subject: adds ClassFile.JAVA_9 --- src/main/javassist/bytecode/ClassFile.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/javassist/bytecode/ClassFile.java') diff --git a/src/main/javassist/bytecode/ClassFile.java b/src/main/javassist/bytecode/ClassFile.java index 887ec7a3..9e7729fd 100644 --- a/src/main/javassist/bytecode/ClassFile.java +++ b/src/main/javassist/bytecode/ClassFile.java @@ -117,6 +117,12 @@ public final class ClassFile { */ public static final int JAVA_8 = 52; + /** + * The major version number of class files + * for JDK 1.9. + */ + public static final int JAVA_9 = 53; + /** * The major version number of class files created * from scratch. The default value is 47 (JDK 1.3). @@ -128,6 +134,8 @@ public final class ClassFile { * if the JVM supports java.lang.invoke.CallSite. * It is 52 (JDK 1.8) * if the JVM supports java.util.function.Function. + * It is 53 (JDK 1.9) + * if the JVM supports java.lang.reflect.Module. */ public static final int MAJOR_VERSION; @@ -142,6 +150,8 @@ public final class ClassFile { ver = JAVA_7; Class.forName("java.util.function.Function"); ver = JAVA_8; + Class.forName("java.lang.reflect.Module"); + ver = JAVA_9; } catch (Throwable t) {} MAJOR_VERSION = ver; -- cgit v1.2.3