Enum CompatibilityPolicy

java.lang.Object
java.lang.Enum<CompatibilityPolicy>
io.github.thunkware.vt.bridge.CompatibilityPolicy
All Implemented Interfaces:
Serializable, Comparable<CompatibilityPolicy>, java.lang.constant.Constable

public enum CompatibilityPolicy extends Enum<CompatibilityPolicy>
Policy on how to apply (in)compatibility
  • Enum Constant Details

    • BEST_EFFORT

      public static final CompatibilityPolicy 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

      public static final CompatibilityPolicy 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

      public static CompatibilityPolicy[] 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

      public static CompatibilityPolicy 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 name
      NullPointerException - if the argument is null