< prev index next >

src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java

Print this page

44 @Target({ElementType.METHOD,
45          ElementType.CONSTRUCTOR,
46          ElementType.FIELD,
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     public enum Feature {
63         SWITCH_PATTERN_MATCHING,


64         /**
65          * A key for testing.
66          */
67         TEST,
68         ;
69     }
70 }

44 @Target({ElementType.METHOD,
45          ElementType.CONSTRUCTOR,
46          ElementType.FIELD,
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     public enum Feature {
63         SWITCH_PATTERN_MATCHING,
64         SCOPE_LOCALS,
65         VIRTUAL_THREADS,
66         /**
67          * A key for testing.
68          */
69         TEST,
70         ;
71     }
72 }
< prev index next >