Enum MixinEnvironment.CompatibilityLevel

java.lang.Object
java.lang.Enum<MixinEnvironment.CompatibilityLevel>
org.spongepowered.asm.mixin.MixinEnvironment.CompatibilityLevel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MixinEnvironment.CompatibilityLevel>, java.lang.constant.Constable
Enclosing class:
MixinEnvironment

public static enum MixinEnvironment.CompatibilityLevel
extends java.lang.Enum<MixinEnvironment.CompatibilityLevel>
Operational compatibility level for the mixin subsystem
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static MixinEnvironment.CompatibilityLevel[] 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 MixinEnvironment.CompatibilityLevel valueOf​(java.lang.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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • classVersion

      public int classVersion()
      Class version expected at this compatibility level
    • supportsMethodsInInterfaces

      @Deprecated public boolean supportsMethodsInInterfaces()
      Deprecated.
      Use supports(int) instead
      Get whether this environment supports non-abstract methods in interfaces, true in Java 1.8 and above
    • supports

      public boolean supports​(int languageFeature)
      Get whether the specified MixinEnvironment.CompatibilityLevel.LanguageFeature is supported by this runtime.
      Parameters:
      languageFeature - language feature (or features) to check
      Returns:
      true if all specified language features are supported
    • isAtLeast

      public boolean isAtLeast​(MixinEnvironment.CompatibilityLevel level)
      Get whether this level is the same or greater than the specified level
      Parameters:
      level - level to compare to
      Returns:
      true if this level is equal or higher the supplied level
    • isLessThan

      public boolean isLessThan​(MixinEnvironment.CompatibilityLevel level)
      Get whether this level is less than the specified level
      Parameters:
      level - level to compare to
      Returns:
      true if this level is less than the supplied level
    • canElevateTo

      public boolean canElevateTo​(MixinEnvironment.CompatibilityLevel level)
      Get whether this level can be elevated to the specified level
      Parameters:
      level - desired level
      Returns:
      true if this level supports elevation
    • canSupport

      public boolean canSupport​(MixinEnvironment.CompatibilityLevel level)
      True if this level can support the specified level
      Parameters:
      level - desired level
      Returns:
      true if the other level can be elevated to this level