mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
This patch encapsulates the logic that checks if a used feature is annotated with PreviewFeature in its own visitor. The visitor now checks both PreviewFeature annotations with old and new packages. GitOrigin-RevId: f3ddc2a840b8c3a8bb4e1a731e2c208002a29fd4
28 lines
537 B
Java
28 lines
537 B
Java
package jdk.internal.javac;
|
|
|
|
import java.lang.annotation.*;
|
|
|
|
@Target({ElementType.METHOD,
|
|
ElementType.CONSTRUCTOR,
|
|
ElementType.FIELD,
|
|
ElementType.PACKAGE,
|
|
ElementType.TYPE})
|
|
@Retention(RetentionPolicy.CLASS)
|
|
public @interface PreviewFeature {
|
|
/**
|
|
* Name of the preview feature the annotated API is associated
|
|
* with.
|
|
*/
|
|
public Feature feature();
|
|
|
|
public boolean essentialAPI() default false;
|
|
|
|
public enum Feature {
|
|
PATTERN_MATCHING_IN_INSTANCEOF,
|
|
TEXT_BLOCKS,
|
|
RECORDS,
|
|
SEALED_CLASSES
|
|
;
|
|
}
|
|
}
|