< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java

Print this page

222         POST_APPLICABILITY_VARARGS_ACCESS_CHECK(JDK8),
223         MAP_CAPTURES_TO_BOUNDS(MIN, JDK7),
224         PRIVATE_SAFE_VARARGS(JDK9),
225         DIAMOND_WITH_ANONYMOUS_CLASS_CREATION(JDK9, Fragments.FeatureDiamondAndAnonClass, DiagKind.NORMAL),
226         UNDERSCORE_IDENTIFIER(MIN, JDK8),
227         PRIVATE_INTERFACE_METHODS(JDK9, Fragments.FeaturePrivateIntfMethods, DiagKind.PLURAL),
228         LOCAL_VARIABLE_TYPE_INFERENCE(JDK10),
229         VAR_SYNTAX_IMPLICIT_LAMBDAS(JDK11, Fragments.FeatureVarSyntaxInImplicitLambda, DiagKind.PLURAL),
230         IMPORT_ON_DEMAND_OBSERVABLE_PACKAGES(JDK1_2, JDK8),
231         SWITCH_MULTIPLE_CASE_LABELS(JDK14, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL),
232         SWITCH_RULE(JDK14, Fragments.FeatureSwitchRules, DiagKind.PLURAL),
233         SWITCH_EXPRESSION(JDK14, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL),
234         TEXT_BLOCKS(JDK15, Fragments.FeatureTextBlocks, DiagKind.PLURAL),
235         PATTERN_MATCHING_IN_INSTANCEOF(JDK16, Fragments.FeaturePatternMatchingInstanceof, DiagKind.NORMAL),
236         REIFIABLE_TYPES_INSTANCEOF(JDK16, Fragments.FeatureReifiableTypesInstanceof, DiagKind.PLURAL),
237         RECORDS(JDK16, Fragments.FeatureRecords, DiagKind.PLURAL),
238         SEALED_CLASSES(JDK17, Fragments.FeatureSealedClasses, DiagKind.PLURAL),
239         CASE_NULL(JDK17, Fragments.FeatureCaseNull, DiagKind.NORMAL),
240         PATTERN_SWITCH(JDK17, Fragments.FeaturePatternSwitch, DiagKind.PLURAL),
241         REDUNDANT_STRICTFP(JDK17),


242         ;
243 
244         enum DiagKind {
245             NORMAL,
246             PLURAL;
247         }
248 
249         private final Source minLevel;
250         private final Source maxLevel;
251         private final Fragment optFragment;
252         private final DiagKind optKind;
253 
254         Feature(Source minLevel) {
255             this(minLevel, null, null);
256         }
257 
258         Feature(Source minLevel, Fragment optFragment, DiagKind optKind) {
259             this(minLevel, MAX, optFragment, optKind);
260         }
261 

222         POST_APPLICABILITY_VARARGS_ACCESS_CHECK(JDK8),
223         MAP_CAPTURES_TO_BOUNDS(MIN, JDK7),
224         PRIVATE_SAFE_VARARGS(JDK9),
225         DIAMOND_WITH_ANONYMOUS_CLASS_CREATION(JDK9, Fragments.FeatureDiamondAndAnonClass, DiagKind.NORMAL),
226         UNDERSCORE_IDENTIFIER(MIN, JDK8),
227         PRIVATE_INTERFACE_METHODS(JDK9, Fragments.FeaturePrivateIntfMethods, DiagKind.PLURAL),
228         LOCAL_VARIABLE_TYPE_INFERENCE(JDK10),
229         VAR_SYNTAX_IMPLICIT_LAMBDAS(JDK11, Fragments.FeatureVarSyntaxInImplicitLambda, DiagKind.PLURAL),
230         IMPORT_ON_DEMAND_OBSERVABLE_PACKAGES(JDK1_2, JDK8),
231         SWITCH_MULTIPLE_CASE_LABELS(JDK14, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL),
232         SWITCH_RULE(JDK14, Fragments.FeatureSwitchRules, DiagKind.PLURAL),
233         SWITCH_EXPRESSION(JDK14, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL),
234         TEXT_BLOCKS(JDK15, Fragments.FeatureTextBlocks, DiagKind.PLURAL),
235         PATTERN_MATCHING_IN_INSTANCEOF(JDK16, Fragments.FeaturePatternMatchingInstanceof, DiagKind.NORMAL),
236         REIFIABLE_TYPES_INSTANCEOF(JDK16, Fragments.FeatureReifiableTypesInstanceof, DiagKind.PLURAL),
237         RECORDS(JDK16, Fragments.FeatureRecords, DiagKind.PLURAL),
238         SEALED_CLASSES(JDK17, Fragments.FeatureSealedClasses, DiagKind.PLURAL),
239         CASE_NULL(JDK17, Fragments.FeatureCaseNull, DiagKind.NORMAL),
240         PATTERN_SWITCH(JDK17, Fragments.FeaturePatternSwitch, DiagKind.PLURAL),
241         REDUNDANT_STRICTFP(JDK17),
242         PRIMITIVE_CLASSES(JDK18, Fragments.FeaturePrimitiveClasses, DiagKind.PLURAL),
243         VALUE_CLASSES(JDK18, Fragments.FeatureValueClasses, DiagKind.PLURAL),
244         ;
245 
246         enum DiagKind {
247             NORMAL,
248             PLURAL;
249         }
250 
251         private final Source minLevel;
252         private final Source maxLevel;
253         private final Fragment optFragment;
254         private final DiagKind optKind;
255 
256         Feature(Source minLevel) {
257             this(minLevel, null, null);
258         }
259 
260         Feature(Source minLevel, Fragment optFragment, DiagKind optKind) {
261             this(minLevel, MAX, optFragment, optKind);
262         }
263 
< prev index next >