< prev index next >

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

Print this page


   1 /*
   2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


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


   1 /*
   2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  93     public final static int REF_putField = 3;
  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 nn: nestmates
 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 


< prev index next >