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