< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java

Print this page
rev 48343 : imported patch JDK-8173382-classfile-version


  94     public final static int REF_putStatic = 4;
  95     public final static int REF_invokeVirtual = 5;
  96     public final static int REF_invokeStatic = 6;
  97     public final static int REF_invokeSpecial = 7;
  98     public final static int REF_newInvokeSpecial = 8;
  99     public final static int REF_invokeInterface = 9;
 100 
 101     public final static int MAX_PARAMETERS = 0xff;
 102     public final static int MAX_DIMENSIONS = 0xff;
 103     public final static int MAX_CODE = 0xffff;
 104     public final static int MAX_LOCALS = 0xffff;
 105     public final static int MAX_STACK = 0xffff;
 106 
 107     public enum Version {
 108         V45_3(45, 3), // base level for all attributes
 109         V49(49, 0),   // JDK 1.5: enum, generics, annotations
 110         V50(50, 0),   // JDK 1.6: stackmaps
 111         V51(51, 0),   // JDK 1.7
 112         V52(52, 0),   // JDK 1.8: lambda, type annos, param names
 113         V53(53, 0),   // JDK 1.9: modules, indy string concat
 114         V54(54, 0);   // JDK 10

 115         Version(int major, int minor) {
 116             this.major = major;
 117             this.minor = minor;
 118         }
 119         public final int major, minor;
 120 
 121         private static final Version MIN = values()[0];
 122         /** Return the least version supported, MIN */
 123         public static Version MIN() { return MIN; }
 124 
 125         private static final Version MAX = values()[values().length-1];
 126         /** Return the largest version supported, MAX */
 127         public static Version MAX() { return MAX; }
 128     }
 129 
 130 
 131 /************************************************************************
 132  * String Translation Routines
 133  ***********************************************************************/
 134 




  94     public final static int REF_putStatic = 4;
  95     public final static int REF_invokeVirtual = 5;
  96     public final static int REF_invokeStatic = 6;
  97     public final static int REF_invokeSpecial = 7;
  98     public final static int REF_newInvokeSpecial = 8;
  99     public final static int REF_invokeInterface = 9;
 100 
 101     public final static int MAX_PARAMETERS = 0xff;
 102     public final static int MAX_DIMENSIONS = 0xff;
 103     public final static int MAX_CODE = 0xffff;
 104     public final static int MAX_LOCALS = 0xffff;
 105     public final static int MAX_STACK = 0xffff;
 106 
 107     public enum Version {
 108         V45_3(45, 3), // base level for all attributes
 109         V49(49, 0),   // JDK 1.5: enum, generics, annotations
 110         V50(50, 0),   // JDK 1.6: stackmaps
 111         V51(51, 0),   // JDK 1.7
 112         V52(52, 0),   // JDK 1.8: lambda, type annos, param names
 113         V53(53, 0),   // JDK 1.9: modules, indy string concat
 114         V54(54, 0),   // JDK 10
 115         V55(55, 0);   // JDK 11: constant dynamic
 116         Version(int major, int minor) {
 117             this.major = major;
 118             this.minor = minor;
 119         }
 120         public final int major, minor;
 121 
 122         private static final Version MIN = values()[0];
 123         /** Return the least version supported, MIN */
 124         public static Version MIN() { return MIN; }
 125 
 126         private static final Version MAX = values()[values().length-1];
 127         /** Return the largest version supported, MAX */
 128         public static Version MAX() { return MAX; }
 129     }
 130 
 131 
 132 /************************************************************************
 133  * String Translation Routines
 134  ***********************************************************************/
 135 


< prev index next >