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 /**
61 * A reflective preview API may be used without causing a compilation error
62 * when preview features are disabled (JLS {@jls 1.5.1}), but still causes
63 * a preview warning.
64 */
65 public boolean reflective() default false;
66
67 /**
68 * Enum of preview features in the current release.
69 * Values should be annotated with the feature's {@code JEP}.
70 */
71 public enum Feature {
72 @JEP(number=533, title="Structured Concurrency", status="Seventh Preview")
73 STRUCTURED_CONCURRENCY,
74 @JEP(number = 531, title = "Lazy Constants", status = "Third Preview")
75 LAZY_CONSTANTS,
76 @JEP(number=538, title="PEM Encodings of Cryptographic Objects",
77 status="Third Preview")
78 PEM_API,
79 /**
80 * Indicates a preview API exists to allow access to the environment
81 * where all preview features of the current Java SE release are enabled.
82 * Such an API is usually {@link #reflective()} and never intended to
83 * become permanent. This "feature" does not have a JEP and its APIs
84 * are not displayed in the "Preview API" page in Javadoc output.
85 */
86 PREVIEW_SUPPORT,
87 /**
88 * A key for testing.
89 */
90 @JEP(number=2_147_483_647, title="Test Feature")
91 TEST,
|
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 /**
61 * A reflective preview API may be used without causing a compilation error
62 * when preview features are disabled (JLS {@jls 1.5.1}), but still causes
63 * a preview warning.
64 */
65 public boolean reflective() default false;
66
67 /**
68 * Enum of preview features in the current release.
69 * Values should be annotated with the feature's {@code JEP}.
70 */
71 public enum Feature {
72 @JEP(number = 539, title = "Strict Field Initialization in the JVM", status = "Preview")
73 STRICT_FIELDS,
74 @JEP(number=401, title="Value Classes and Objects", status = "Preview")
75 VALUE_OBJECTS,
76 @JEP(number=533, title="Structured Concurrency", status="Seventh Preview")
77 STRUCTURED_CONCURRENCY,
78 @JEP(number = 531, title = "Lazy Constants", status = "Third Preview")
79 LAZY_CONSTANTS,
80 @JEP(number=538, title="PEM Encodings of Cryptographic Objects",
81 status="Third Preview")
82 PEM_API,
83 /**
84 * Indicates a preview API exists to allow access to the environment
85 * where all preview features of the current Java SE release are enabled.
86 * Such an API is usually {@link #reflective()} and never intended to
87 * become permanent. This "feature" does not have a JEP and its APIs
88 * are not displayed in the "Preview API" page in Javadoc output.
89 */
90 PREVIEW_SUPPORT,
91 /**
92 * A key for testing.
93 */
94 @JEP(number=2_147_483_647, title="Test Feature")
95 TEST,
|