public enum SourceLevel extends Enum<SourceLevel>
| Enum Constant and Description |
|---|
JAVA_10 |
JAVA_11 |
JAVA_12 |
JAVA_13 |
JAVA_14 |
JAVA_15 |
JAVA_16 |
JAVA_17 |
JAVA_7 |
JAVA_8 |
JAVA_9 |
| Modifier and Type | Method and Description |
|---|---|
String |
asString() |
static SourceLevel |
autoDetect()
Detect Java version used and return an enum.
|
static SourceLevel |
fromString(String source)
Parse source level string and return an enum.
|
static String |
getUnsupportedMessage(String source) |
static boolean |
isUnsupported(String source)
Return true if given source level is no longer supported.
|
boolean |
matchesVersion(String version) |
boolean |
supportsFeature(LanguageFeature feature) |
static SourceLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SourceLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SourceLevel JAVA_7
public static final SourceLevel JAVA_8
public static final SourceLevel JAVA_9
public static final SourceLevel JAVA_10
public static final SourceLevel JAVA_11
public static final SourceLevel JAVA_12
public static final SourceLevel JAVA_13
public static final SourceLevel JAVA_14
public static final SourceLevel JAVA_15
public static final SourceLevel JAVA_16
public static final SourceLevel JAVA_17
public static SourceLevel[] values()
for (SourceLevel c : SourceLevel.values()) System.out.println(c);
public static SourceLevel valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static SourceLevel fromString(@NotNull String source)
source - levelpublic static SourceLevel autoDetect()
public static boolean isUnsupported(@NotNull
String source)
source - level, e.g. "1.0"public boolean supportsFeature(LanguageFeature feature)
public boolean matchesVersion(String version)
public String asString()
Copyright © 2024 OpenClover.org. All rights reserved.