Class TypeUtil
java.lang.Object
org.codehaus.groovy.classgen.asm.util.TypeUtil
A utility for getting information of types
- Since:
- 2.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassautoboxType(Class type) Returns the wrapper type for the supplied primitive class, or the class itself if it is already a reference type.static StringgetDescriptionByName(String name) Returns the JVM type descriptor for the supplied type name.static StringReturns the JVM type descriptor for the supplied class node.static intgetLoadInsnByType(org.objectweb.asm.Type type) Returns the load opcode for the supplied ASM type.static intgetReturnInsnByType(org.objectweb.asm.Type type) Returns the return opcode for the supplied ASM type.static StringgetWrappedClassDescriptor(org.objectweb.asm.Type type) Returns the descriptor of the wrapper class corresponding to the supplied primitive ASM type.static booleanisPrimitiveType(String name) Tests whether the supplied type name denotes a primitive type.static booleanisPrimitiveType(ClassNode type) Tests whether the supplied class node denotes a primitive type.static booleanisPrimitiveType(org.objectweb.asm.Type type) Tests whether the supplied ASM type is primitive.
-
Constructor Details
-
TypeUtil
public TypeUtil()
-
-
Method Details
-
autoboxType
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
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
Tests whether the supplied type name denotes a primitive type. -
isPrimitiveType
Tests whether the supplied class node denotes a primitive type. -
getDescriptionByType
Returns the JVM type descriptor for the supplied class node. -
getDescriptionByName
Returns the JVM type descriptor for the supplied type name.
-