47 ElementType.PACKAGE,
48 ElementType.MODULE,
49 ElementType.TYPE})
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 // while building the interim javac, the ClassReader will produce a warning when loading a class
68 // keeping the constant of a feature that has been integrated or dropped, serves the purpose of muting such warnings.
69
70 //---
71 @JEP(number=477, title="Implicitly Declared Classes and Instance Main Methods", status="Third Preview")
72 IMPLICIT_CLASSES,
73 @JEP(number=487, title="Scoped Values", status="Fourth Preview")
74 SCOPED_VALUES,
75 @JEP(number=480, title="Structured Concurrency", status="Third Preview")
76 STRUCTURED_CONCURRENCY,
77 @JEP(number=466, title="ClassFile API", status="Second Preview")
78 CLASSFILE_API,
79 @JEP(number=473, title="Stream Gatherers", status="Second Preview")
80 STREAM_GATHERERS,
81 @JEP(number=476, title="Module Import Declarations", status="Preview")
82 MODULE_IMPORTS,
83 @JEP(number=478, title="Key Derivation Function API", status="Preview")
84 KEY_DERIVATION,
85 LANGUAGE_MODEL,
86 /**
87 * A key for testing.
88 */
89 @JEP(number=2_147_483_647, title="Test Feature")
|
47 ElementType.PACKAGE,
48 ElementType.MODULE,
49 ElementType.TYPE})
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 @JEP(number=401, title="Value Classes and Objects", status = "Preview")
68 VALUE_OBJECTS,
69
70 // while building the interim javac, the ClassReader will produce a warning when loading a class
71 // keeping the constant of a feature that has been integrated or dropped, serves the purpose of muting such warnings.
72 //---
73 @JEP(number=477, title="Implicitly Declared Classes and Instance Main Methods", status="Third Preview")
74 IMPLICIT_CLASSES,
75 @JEP(number=487, title="Scoped Values", status="Fourth Preview")
76 SCOPED_VALUES,
77 @JEP(number=480, title="Structured Concurrency", status="Third Preview")
78 STRUCTURED_CONCURRENCY,
79 @JEP(number=466, title="ClassFile API", status="Second Preview")
80 CLASSFILE_API,
81 @JEP(number=473, title="Stream Gatherers", status="Second Preview")
82 STREAM_GATHERERS,
83 @JEP(number=476, title="Module Import Declarations", status="Preview")
84 MODULE_IMPORTS,
85 @JEP(number=478, title="Key Derivation Function API", status="Preview")
86 KEY_DERIVATION,
87 LANGUAGE_MODEL,
88 /**
89 * A key for testing.
90 */
91 @JEP(number=2_147_483_647, title="Test Feature")
|