Enum ConditionalOnJava.JavaVersion
- java.lang.Object
- java.lang.Enum<ConditionalOnJava.JavaVersion>
- org.springframework.boot.autoconfigure.condition.ConditionalOnJava.JavaVersion
- All Implemented Interfaces:
Serializable
,Comparable<ConditionalOnJava.JavaVersion>
- Enclosing class:
- ConditionalOnJava
public static enum ConditionalOnJava.JavaVersion extends Enum<ConditionalOnJava.JavaVersion>
Java versions.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConditionalOnJava.JavaVersion
getJavaVersion()
Returns theConditionalOnJava.JavaVersion
of the current runtime.boolean
isWithin(ConditionalOnJava.Range range, ConditionalOnJava.JavaVersion version)
Determines if this version is within the specified range of versions.String
toString()
static ConditionalOnJava.JavaVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConditionalOnJava.JavaVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Enum Constant Detail
NINE
public static final ConditionalOnJava.JavaVersion NINE
Java 1.9.
EIGHT
public static final ConditionalOnJava.JavaVersion EIGHT
Java 1.8.
SEVEN
public static final ConditionalOnJava.JavaVersion SEVEN
Java 1.7.
SIX
public static final ConditionalOnJava.JavaVersion SIX
Java 1.6.
Method Detail
values
public static ConditionalOnJava.JavaVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConditionalOnJava.JavaVersion c : ConditionalOnJava.JavaVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static ConditionalOnJava.JavaVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
isWithin
public boolean isWithin(ConditionalOnJava.Range range, ConditionalOnJava.JavaVersion version)
Determines if this version is within the specified range of versions.- Parameters:
range
- the rangeversion
- the bounds of the range- Returns:
- if this version is within the specified range
toString
public String toString()
- Overrides:
toString
in classEnum<ConditionalOnJava.JavaVersion>
getJavaVersion
public static ConditionalOnJava.JavaVersion getJavaVersion()
Returns theConditionalOnJava.JavaVersion
of the current runtime.- Returns:
- the
ConditionalOnJava.JavaVersion