APIdia Launch Partner
Top Description Inners Methods
jdk.internal.javac

public @Interface PreviewFeature

extends Annotation
Annotations
@Target:METHOD, CONSTRUCTOR, FIELD, PACKAGE, MODULE, TYPE
@Retention:CLASS
Imports
java.lang.annotation.*

Indicates the API declaration in question is associated with a preview feature. See JEP 12: "Preview Language and VM Features" (https://openjdk.org/jeps/12). Note this internal annotation is handled specially by the javac compiler. To work properly with --release older-release, it requires special handling in make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java and src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java.
Since
14

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PreviewFeature.Feature

Enum of preview features in the current release.

public static @interface
PreviewFeature.JEP

Annotation identifying the JEP associated with a preview feature.

Method Summary

Modifier and TypeMethod and Description
public PreviewFeature.Feature
feature()

Name of the preview feature the annotated API is associated with.

public boolean
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

featureback to summary
public PreviewFeature.Feature feature()

Name of the preview feature the annotated API is associated with.

reflectiveback to summary
public boolean reflective()
jdk.internal.javac back to summary

public final Enum PreviewFeature.Feature

extends Enum<PreviewFeature.Feature>
Class Inheritance

Enum of preview features in the current release. Values should be annotated with the feature's JEP.

Field Summary

Modifier and TypeField and Description
public static final PreviewFeature.Feature
public static final PreviewFeature.Feature
public static final PreviewFeature.Feature
public static final PreviewFeature.Feature
public static final PreviewFeature.Feature
TEST

A key for testing.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PreviewFeature.Feature
public static PreviewFeature.Feature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LANGUAGE_MODELback to summary
public static final PreviewFeature.Feature LANGUAGE_MODEL
LAZY_CONSTANTSback to summary
public static final PreviewFeature.Feature LAZY_CONSTANTS
Annotations
@JEP
number:531
title:Lazy Constants
status:Third Preview
PEM_APIback to summary
public static final PreviewFeature.Feature PEM_API
Annotations
@JEP
number:538
title:PEM Encodings of Cryptographic Objects
status:Third Preview
STRUCTURED_CONCURRENCYback to summary
public static final PreviewFeature.Feature STRUCTURED_CONCURRENCY
Annotations
@JEP
number:533
title:Structured Concurrency
status:Seventh Preview
TESTback to summary
public static final PreviewFeature.Feature TEST

A key for testing.

Annotations
@JEP
number:2147483647
title:Test Feature

Constructor Detail

Featureback to summary
private Feature()

Method Detail

valueOfback to summary
public static PreviewFeature.Feature valueOf(String name)
valuesback to summary
public static PreviewFeature.Feature[] values()
jdk.internal.javac back to summary

public @Interface PreviewFeature.JEP

extends Annotation
Annotations
@Target:FIELD
@Retention:CLASS

Annotation identifying the JEP associated with a preview feature.

Method Summary

Modifier and TypeMethod and Description
public int
number()

JEP number

public String
status()

JEP status such as "Preview", "Second Preview", etc

public String
title()

JEP title in plain text

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

numberback to summary
public int number()

JEP number

statusback to summary
public String status()

JEP status such as "Preview", "Second Preview", etc

titleback to summary
public String title()

JEP title in plain text