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 IMPLICIT_CLASSES, //to be removed when boot JDK is 25
72 SCOPED_VALUES,
73 @JEP(number=505, title="Structured Concurrency", status="Fifth Preview")
74 STRUCTURED_CONCURRENCY,
75 CLASSFILE_API,
76 STREAM_GATHERERS,
77 MODULE_IMPORTS, //remove when the boot JDK is JDK 25
78 KEY_DERIVATION, //remove when the boot JDK is JDK 25
79 @JEP(number = 502, title = "Stable Values", status = "Preview")
80 STABLE_VALUES,
81 @JEP(number=470, title="PEM Encodings of Cryptographic Objects", status="Preview")
82 PEM_API,
83 LANGUAGE_MODEL,
84 /**
85 * A key for testing.
86 */
87 @JEP(number=2_147_483_647, title="Test Feature")
88 TEST,
89 ;
|
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 IMPLICIT_CLASSES, //to be removed when boot JDK is 25
74 SCOPED_VALUES,
75 @JEP(number=505, title="Structured Concurrency", status="Fifth Preview")
76 STRUCTURED_CONCURRENCY,
77 CLASSFILE_API,
78 STREAM_GATHERERS,
79 MODULE_IMPORTS, //remove when the boot JDK is JDK 25
80 KEY_DERIVATION, //remove when the boot JDK is JDK 25
81 @JEP(number = 502, title = "Stable Values", status = "Preview")
82 STABLE_VALUES,
83 @JEP(number=470, title="PEM Encodings of Cryptographic Objects", status="Preview")
84 PEM_API,
85 LANGUAGE_MODEL,
86 /**
87 * A key for testing.
88 */
89 @JEP(number=2_147_483_647, title="Test Feature")
90 TEST,
91 ;
|