Package io.github.thunkware.vt.bridge
Enum CompatibilityPolicy
- All Implemented Interfaces:
Serializable,Comparable<CompatibilityPolicy>,java.lang.constant.Constable
Policy on how to apply (in)compatibility
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf Java21 feature is accessed on Java8+ VM, then make best-effort to be compatible.If Java21 feature is accessed on Java8+ VM, then throw exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompatibilityPolicyReturns the enum constant of this type with the specified name.static CompatibilityPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BEST_EFFORT
If Java21 feature is accessed on Java8+ VM, then make best-effort to be compatible. e.g. Attempting to create virtual thread on Java8+ VM will result in a platform thread. -
THROW_EXCEPTION
If Java21 feature is accessed on Java8+ VM, then throw exception. e.g. Attempting to create virtual thread on Java8+ VM will throw exception.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-