Class TypeUtil

java.lang.Object
org.codehaus.groovy.classgen.asm.util.TypeUtil

public abstract class TypeUtil extends Object
A utility for getting information of types
Since:
2.5.0
  • Constructor Details

    • TypeUtil

      public TypeUtil()
  • Method Details

    • autoboxType

      public static Class autoboxType(Class type)
      Returns the wrapper type for the supplied primitive class, or the class itself if it is already a reference type.
    • getLoadInsnByType

      public static int getLoadInsnByType(org.objectweb.asm.Type type)
      Returns the load opcode for the supplied ASM type.
    • getReturnInsnByType

      public static int getReturnInsnByType(org.objectweb.asm.Type type)
      Returns the return opcode for the supplied ASM type.
    • getWrappedClassDescriptor

      public static String getWrappedClassDescriptor(org.objectweb.asm.Type type)
      Returns the descriptor of the wrapper class corresponding to the supplied primitive ASM type.
    • isPrimitiveType

      public static boolean isPrimitiveType(org.objectweb.asm.Type type)
      Tests whether the supplied ASM type is primitive.
    • isPrimitiveType

      public static boolean isPrimitiveType(String name)
      Tests whether the supplied type name denotes a primitive type.
    • isPrimitiveType

      public static boolean isPrimitiveType(ClassNode type)
      Tests whether the supplied class node denotes a primitive type.
    • getDescriptionByType

      public static String getDescriptionByType(ClassNode type)
      Returns the JVM type descriptor for the supplied class node.
    • getDescriptionByName

      public static String getDescriptionByName(String name)
      Returns the JVM type descriptor for the supplied type name.