< prev index next >

src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java

Print this page

277      *
278      * @since 21
279      *
280      * @see <a
281      * href="https://docs.oracle.com/javase/specs/jvms/se21/html/index.html">
282      * <cite>The Java Virtual Machine Specification, Java SE 21 Edition</cite></a>
283      */
284     RELEASE_21(65),
285 
286     /**
287      * The version introduced by the Java Platform, Standard Edition
288      * 22.
289      *
290      * @since 22
291      *
292      * @see <a
293      * href="https://docs.oracle.com/javase/specs/jvms/se22/html/index.html">
294      * <cite>The Java Virtual Machine Specification, Java SE 22 Edition</cite></a>
295      */
296     RELEASE_22(66),












297     ; // Reduce code churn when appending new constants
298 
299     // Note to maintainers: when adding constants for newer releases,
300     // the implementation of latest() must be updated too.
301 
302     private final int major;
303 
304     private ClassFileFormatVersion(int major) {
305         this.major = major;
306     }
307 
308     /**
309      * {@return the latest class file format version}
310      */
311     public static ClassFileFormatVersion latest() {
312         return RELEASE_22;
313     }
314 
315     /**
316      * {@return the major class file version as an integer}

277      *
278      * @since 21
279      *
280      * @see <a
281      * href="https://docs.oracle.com/javase/specs/jvms/se21/html/index.html">
282      * <cite>The Java Virtual Machine Specification, Java SE 21 Edition</cite></a>
283      */
284     RELEASE_21(65),
285 
286     /**
287      * The version introduced by the Java Platform, Standard Edition
288      * 22.
289      *
290      * @since 22
291      *
292      * @see <a
293      * href="https://docs.oracle.com/javase/specs/jvms/se22/html/index.html">
294      * <cite>The Java Virtual Machine Specification, Java SE 22 Edition</cite></a>
295      */
296     RELEASE_22(66),
297 
298     /**
299      * The version introduced by the Java Platform, Standard Edition
300      * 23.
301      *
302      * @since 23
303      *
304      * @see <a
305      * href="https://docs.oracle.com/javase/specs/jvms/se23/html/index.html">
306      * <cite>The Java Virtual Machine Specification, Java SE 23 Edition</cite></a>
307      */
308     RELEASE_23(67),
309     ; // Reduce code churn when appending new constants
310 
311     // Note to maintainers: when adding constants for newer releases,
312     // the implementation of latest() must be updated too.
313 
314     private final int major;
315 
316     private ClassFileFormatVersion(int major) {
317         this.major = major;
318     }
319 
320     /**
321      * {@return the latest class file format version}
322      */
323     public static ClassFileFormatVersion latest() {
324         return RELEASE_22;
325     }
326 
327     /**
328      * {@return the major class file version as an integer}
< prev index next >