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