Package org.spongepowered.asm.util.asm
Class ASM
java.lang.Object
org.spongepowered.asm.util.asm.ASM
Utility methods for determining ASM version and other version-specific
shenanigans
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intGet the major API versionstatic intGet the minor API versionstatic StringGet the ASM API version as a string (mostly for debugging)static StringGet the supported java version as a string (mostly for the banner)static intGet the maximum supported class version (raw)static intGet the maximum supported major class versiorstatic intGet the maximum supported minor class versiorstatic StringGet 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)
-
Field Details
-
API_VERSION
public static final int API_VERSIONThe detected ASM API Version
-
-
Method Details
-
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
Get the ASM API version as a string (mostly for debugging)- Returns:
- ASM API version as 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
Get the supported java version as a string (mostly for the banner)- Returns:
- Java class supported version as string
-