[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation

This patch adds support of the jdk.internal.PreviewFeature annotation

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: b2f56d62c3b12475690f667628811e5345b1d1cf
This commit is contained in:
Nikita Eshkeev
2020-06-18 01:19:37 +03:00
committed by intellij-monorepo-bot
parent 98d35a58ad
commit 6cdf8f6eef
17 changed files with 323 additions and 1 deletions
@@ -0,0 +1,26 @@
package jdk.internal;
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,
;
}
}