< prev index next >

src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java

Print this page

55      * Name of the preview feature the annotated API is associated
56      * with.
57      */
58     public Feature feature();
59 
60     public boolean reflective() default false;
61 
62     /**
63      * Enum of preview features in the current release.
64      * Values should be annotated with the feature's {@code JEP}.
65      */
66     public enum Feature {
67         @JEP(number=433, title="Pattern Matching for switch", status="Fourth Preview")
68         SWITCH_PATTERN_MATCHING(),
69         @JEP(number=432, title="Record Patterns", status="Second Preview")
70         RECORD_PATTERNS,
71         @JEP(number=436, title="Virtual Threads", status="Second Preview")
72         VIRTUAL_THREADS,
73         @JEP(number=434, title="Foreign Function & Memory API", status="Second Preview")
74         FOREIGN,


75         /**
76          * A key for testing.
77          */
78         @JEP(number=0, title="Test Feature")
79         TEST,
80         ;
81     }
82 
83     /**
84      * Annotation identifying the JEP associated with a preview feature.
85      */
86     @Target(ElementType.FIELD)
87     @Retention(RetentionPolicy.CLASS)
88     @interface JEP {
89         /** JEP number */
90         int number() default 0;
91         /** JEP title in plain text */
92         String title();
93         /** JEP status such as "Preview", "Second Preview", etc */
94         String status() default "Preview";

55      * Name of the preview feature the annotated API is associated
56      * with.
57      */
58     public Feature feature();
59 
60     public boolean reflective() default false;
61 
62     /**
63      * Enum of preview features in the current release.
64      * Values should be annotated with the feature's {@code JEP}.
65      */
66     public enum Feature {
67         @JEP(number=433, title="Pattern Matching for switch", status="Fourth Preview")
68         SWITCH_PATTERN_MATCHING(),
69         @JEP(number=432, title="Record Patterns", status="Second Preview")
70         RECORD_PATTERNS,
71         @JEP(number=436, title="Virtual Threads", status="Second Preview")
72         VIRTUAL_THREADS,
73         @JEP(number=434, title="Foreign Function & Memory API", status="Second Preview")
74         FOREIGN,
75         @JEP(number=8277163, title="Value Objects")
76         VALUE_OBJECTS,
77         /**
78          * A key for testing.
79          */
80         @JEP(number=0, title="Test Feature")
81         TEST,
82         ;
83     }
84 
85     /**
86      * Annotation identifying the JEP associated with a preview feature.
87      */
88     @Target(ElementType.FIELD)
89     @Retention(RetentionPolicy.CLASS)
90     @interface JEP {
91         /** JEP number */
92         int number() default 0;
93         /** JEP title in plain text */
94         String title();
95         /** JEP status such as "Preview", "Second Preview", etc */
96         String status() default "Preview";
< prev index next >