Class ASM

java.lang.Object
org.spongepowered.asm.util.asm.ASM

public final class ASM extends Object
Utility methods for determining ASM version and other version-specific shenanigans
  • Field Details

    • API_VERSION

      public static final int API_VERSION
      The 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 for
      patchVersion - 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 String getApiVersionString()
      Get the ASM API version as a string (mostly for debugging)
      Returns:
      ASM API version as string
    • getVersionString

      public static 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 String getClassVersionString()
      Get the supported java version as a string (mostly for the banner)
      Returns:
      Java class supported version as string