Package org.spongepowered.asm.mixin
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMixinEnvironment.CompatibilityLevel.LanguageFeatureBitmask values for language features supportedNested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
Enum Constants Enum Constant Description JAVA_10Java 10 and aboveJAVA_11Java 10 and aboveJAVA_12Java 12 and aboveJAVA_13Java 13 and aboveJAVA_14Java 14 and aboveJAVA_15Java 16 and aboveJAVA_16Java 16 and aboveJAVA_17Java 17 and aboveJAVA_6Java 6 and aboveJAVA_7Java 7 and aboveJAVA_8Java 8 and aboveJAVA_9Java 9 and above -
Field Summary
Fields Modifier and Type Field Description static MixinEnvironment.CompatibilityLevelDEFAULTDefault compatibility level to use if not specified by the service -
Method Summary
Modifier and Type Method Description booleancanElevateTo(MixinEnvironment.CompatibilityLevel level)Get whether this level can be elevated to the specified levelbooleancanSupport(MixinEnvironment.CompatibilityLevel level)True if this level can support the specified levelintclassVersion()Class version expected at this compatibility levelbooleanisAtLeast(MixinEnvironment.CompatibilityLevel level)Get whether this level is the same or greater than the specified levelbooleanisLessThan(MixinEnvironment.CompatibilityLevel level)Get whether this level is less than the specified levelbooleansupports(int languageFeature)Get whether the specifiedMixinEnvironment.CompatibilityLevel.LanguageFeatureis supported by this runtime.booleansupportsMethodsInInterfaces()Deprecated.static MixinEnvironment.CompatibilityLevelvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MixinEnvironment.CompatibilityLevel[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
JAVA_6
Java 6 and above -
JAVA_7
Java 7 and above -
JAVA_8
Java 8 and above -
JAVA_9
Java 9 and above -
JAVA_10
Java 10 and above -
JAVA_11
Java 10 and above -
JAVA_12
Java 12 and above -
JAVA_13
Java 13 and above -
JAVA_14
Java 14 and above -
JAVA_15
Java 16 and above -
JAVA_16
Java 16 and above -
JAVA_17
Java 17 and above
-
-
Field Details
-
DEFAULT
Default compatibility level to use if not specified by the service
-
-
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
classVersion
public int classVersion()Class version expected at this compatibility level -
supportsMethodsInInterfaces
@Deprecated public boolean supportsMethodsInInterfaces()Deprecated.Usesupports(int)insteadGet 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 specifiedMixinEnvironment.CompatibilityLevel.LanguageFeatureis supported by this runtime.- Parameters:
languageFeature- language feature (or features) to check- Returns:
- true if all specified language features are supported
-
isAtLeast
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
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
Get whether this level can be elevated to the specified level- Parameters:
level- desired level- Returns:
- true if this level supports elevation
-
canSupport
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
-
supports(int)instead