< prev index next >

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

Print this page

 50  // CLASS retention will hopefully be sufficient for the purposes at hand
 51 @Retention(RetentionPolicy.CLASS)
 52 // *Not* @Documented
 53 public @interface PreviewFeature {
 54     /**
 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         // not used, but required for interim javac to not warn.
 68         VIRTUAL_THREADS,
 69         FOREIGN,



 70         @JEP(number=459, title="String Templates", status="Second Preview")
 71         STRING_TEMPLATES,
 72         @JEP(number=445, title="Unnamed Classes and Instance Main Methods")
 73         UNNAMED_CLASSES,
 74         @JEP(number=446, title="Scoped Values", status="Preview")
 75         SCOPED_VALUES,
 76         @JEP(number=453, title="Structured Concurrency", status="Preview")
 77         STRUCTURED_CONCURRENCY,
 78         /**
 79          * A key for testing.
 80          */
 81         @JEP(number=0, title="Test Feature")
 82         TEST,
 83         ;
 84     }
 85 
 86     /**
 87      * Annotation identifying the JEP associated with a preview feature.
 88      */
 89     @Target(ElementType.FIELD)

 50  // CLASS retention will hopefully be sufficient for the purposes at hand
 51 @Retention(RetentionPolicy.CLASS)
 52 // *Not* @Documented
 53 public @interface PreviewFeature {
 54     /**
 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         // not used, but required for interim javac to not warn.
 68         VIRTUAL_THREADS,
 69         FOREIGN,
 70         @JEP(number=8277163, title="Value Objects")
 71         VALUE_OBJECTS,
 72 
 73         @JEP(number=459, title="String Templates", status="Second Preview")
 74         STRING_TEMPLATES,
 75         @JEP(number=445, title="Unnamed Classes and Instance Main Methods")
 76         UNNAMED_CLASSES,
 77         @JEP(number=446, title="Scoped Values", status="Preview")
 78         SCOPED_VALUES,
 79         @JEP(number=453, title="Structured Concurrency", status="Preview")
 80         STRUCTURED_CONCURRENCY,
 81         /**
 82          * A key for testing.
 83          */
 84         @JEP(number=0, title="Test Feature")
 85         TEST,
 86         ;
 87     }
 88 
 89     /**
 90      * Annotation identifying the JEP associated with a preview feature.
 91      */
 92     @Target(ElementType.FIELD)
< prev index next >