< 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", status="Deprecated")
 73         UNNAMED_CLASSES,
 74         @JEP(number=463, title="Implicitly Declared Classes and Instance Main Methods", status="Preview")
 75         IMPLICIT_CLASSES,
 76         @JEP(number=464, title="Scoped Values", status="Second Preview")
 77         SCOPED_VALUES,
 78         @JEP(number=462, title="Structured Concurrency", status="Second Preview")
 79         STRUCTURED_CONCURRENCY,
 80         @JEP(number=457, title="ClassFile API", status="Preview")
 81         CLASSFILE_API,
 82         @JEP(number=461, title="Stream Gatherers", status="Preview")
 83         STREAM_GATHERERS,
 84         /**
 85          * A key for testing.
 86          */
 87         @JEP(number=0, title="Test Feature")
 88         TEST,
 89         ;

 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=401, title="Value Classes and Objects", status = "Preview")
 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", status="Deprecated")
 76         UNNAMED_CLASSES,
 77         @JEP(number=463, title="Implicitly Declared Classes and Instance Main Methods", status="Preview")
 78         IMPLICIT_CLASSES,
 79         @JEP(number=464, title="Scoped Values", status="Second Preview")
 80         SCOPED_VALUES,
 81         @JEP(number=462, title="Structured Concurrency", status="Second Preview")
 82         STRUCTURED_CONCURRENCY,
 83         @JEP(number=457, title="ClassFile API", status="Preview")
 84         CLASSFILE_API,
 85         @JEP(number=461, title="Stream Gatherers", status="Preview")
 86         STREAM_GATHERERS,
 87         /**
 88          * A key for testing.
 89          */
 90         @JEP(number=0, title="Test Feature")
 91         TEST,
 92         ;
< prev index next >