Package org.spongepowered.asm.util.asm
Class ASM
- java.lang.Object
-
- org.spongepowered.asm.util.asm.ASM
-
public final class ASM extends java.lang.ObjectUtility methods for determining ASM version and other version-specific shenanigans
-
-
Field Summary
Fields Modifier and Type Field Description static intAPI_VERSIONThe detected ASM API Version
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetApiVersionMajor()Get the major API versionstatic intgetApiVersionMinor()Get the minor API versionstatic java.lang.StringgetApiVersionString()Get the ASM API version as a string (mostly for debugging)static java.lang.StringgetClassVersionString()Get the supported java version as a string (mostly for the banner)static intgetMaxSupportedClassVersion()Get the maximum supported class version (raw)static intgetMaxSupportedClassVersionMajor()Get the maximum supported major class versiorstatic intgetMaxSupportedClassVersionMinor()Get the maximum supported minor class versiorstatic java.lang.StringgetVersionString()Get the ASM version as a string (mostly for debugging and the banner)static booleanisAtLeastVersion(int majorVersion)Get whether the current ASM API is at least the specified versionstatic booleanisAtLeastVersion(int majorVersion, int minorVersion)Get whether the current ASM API is at least the specified version (including minor version when it's relevant)static booleanisAtLeastVersion(int majorVersion, int minorVersion, int patchVersion)Get whether the current ASM API is at least the specified version (including minor version and patch version when it's relevant)
-
-
-
Method Detail
-
isAtLeastVersion
public static boolean isAtLeastVersion(int majorVersion)
Get whether the current ASM API is at least the specified version- Parameters:
majorVersion- version to check for (eg. 6)
-
isAtLeastVersion
public static boolean isAtLeastVersion(int majorVersion, int minorVersion)Get whether the current ASM API is at least the specified version (including minor version when it's relevant)- Parameters:
majorVersion- major version to check for (eg. 6)minorVersion- minor version to check for
-
isAtLeastVersion
public static boolean isAtLeastVersion(int majorVersion, int minorVersion, int patchVersion)Get whether the current ASM API is at least the specified version (including minor version and patch version when it's relevant)- Parameters:
majorVersion- major version to check for (eg. 6)minorVersion- minor version to check forpatchVersion- patch version to check for
-
getApiVersionMajor
public static int getApiVersionMajor()
Get the major API version
-
getApiVersionMinor
public static int getApiVersionMinor()
Get the minor API version
-
getApiVersionString
public static java.lang.String getApiVersionString()
Get the ASM API version as a string (mostly for debugging)- Returns:
- ASM API version as string
-
getVersionString
public static java.lang.String getVersionString()
Get the ASM version as a string (mostly for debugging and the banner)- Returns:
- ASM library version as string
-
getMaxSupportedClassVersion
public static int getMaxSupportedClassVersion()
Get the maximum supported class version (raw)
-
getMaxSupportedClassVersionMajor
public static int getMaxSupportedClassVersionMajor()
Get the maximum supported major class versior
-
getMaxSupportedClassVersionMinor
public static int getMaxSupportedClassVersionMinor()
Get the maximum supported minor class versior
-
getClassVersionString
public static java.lang.String getClassVersionString()
Get the supported java version as a string (mostly for the banner)- Returns:
- Java class supported version as string
-
-