Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.objectweb.asm.Type
public class Type
extends Object
Field Summary | |
static int |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
static int |
|
static int |
|
static Type |
|
static int |
|
static Type |
|
Method Summary | |
boolean |
|
static Type[] |
|
static Type[] |
|
String |
|
static String |
|
String |
|
static String |
|
int |
|
Type |
|
String |
|
static String |
|
static String |
|
static String |
|
static Type |
|
int |
|
static Type |
|
static Type |
|
int |
|
int |
|
static Type |
|
static Type |
|
int |
|
String |
|
public boolean equals(Object o)
Tests if the given object is equal to this type.
- Parameters:
o
- the object to be compared to this type.
- Returns:
- true if the given object is equal to this type.
public static Type[] getArgumentTypes(Method method)
Returns the Java types corresponding to the argument types of the given method.
- Parameters:
method
- a method.
- Returns:
- the Java types corresponding to the argument types of the given method.
public static Type[] getArgumentTypes(String methodDescriptor)
Returns the Java types corresponding to the argument types of the given method descriptor.
- Parameters:
methodDescriptor
- a method descriptor.
- Returns:
- the Java types corresponding to the argument types of the given method descriptor.
public String getClassName()
Returns the name of the class corresponding to this type.
- Returns:
- the fully qualified name of the class corresponding to this type.
public static String getConstructorDescriptor(Constructor c)
Returns the descriptor corresponding to the given constructor.
- Parameters:
c
- aConstructor
object.
- Returns:
- the descriptor of the given constructor.
public String getDescriptor()
Returns the descriptor corresponding to this Java type.
- Returns:
- the descriptor corresponding to this Java type.
public static String getDescriptor(Class c)
Returns the descriptor corresponding to the given Java type.
- Parameters:
c
- an object class, a primitive class or an array class.
- Returns:
- the descriptor corresponding to the given class.
public int getDimensions()
Returns the number of dimensions of this array type. This method should only be used for an array type.
- Returns:
- the number of dimensions of this array type.
public Type getElementType()
Returns the type of the elements of this array type. This method should only be used for an array type.
- Returns:
- Returns the type of the elements of this array type.
public String getInternalName()
Returns the internal name of the class corresponding to this object or array type. The internal name of a class is its fully qualified name (as returned by Class.getName(), where '.' are replaced by '/'. This method should only be used for an object or array type.
- Returns:
- the internal name of the class corresponding to this object type.
public static String getInternalName(Class c)
Returns the internal name of the given class. The internal name of a class is its fully qualified name, as returned by Class.getName(), where '.' are replaced by '/'.
- Parameters:
c
- an object or array class.
- Returns:
- the internal name of the given class.
public static String getMethodDescriptor(Method m)
Returns the descriptor corresponding to the given method.
- Parameters:
m
- aMethod
object.
- Returns:
- the descriptor of the given method.
public static String getMethodDescriptor(Type returnType, Type[] argumentTypes)
Returns the descriptor corresponding to the given argument and return types.
- Parameters:
returnType
- the return type of the method.argumentTypes
- the argument types of the method.
- Returns:
- the descriptor corresponding to the given argument and return types.
public static Type getObjectType(String internalName)
Returns the Java type corresponding to the given internal name.
- Parameters:
internalName
- an internal name.
- Returns:
- the Java type corresponding to the given internal name.
public int getOpcode(int opcode)
Returns a JVM instruction opcode adapted to this Java type.
- Parameters:
opcode
- a JVM instruction opcode. This opcode must be one of ILOAD, ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR and IRETURN.
- Returns:
- an opcode that is similar to the given opcode, but adapted to this Java type. For example, if this type is float and opcode is IRETURN, this method returns FRETURN.
public static Type getReturnType(Method method)
Returns the Java type corresponding to the return type of the given method.
- Parameters:
method
- a method.
- Returns:
- the Java type corresponding to the return type of the given method.
public static Type getReturnType(String methodDescriptor)
Returns the Java type corresponding to the return type of the given method descriptor.
- Parameters:
methodDescriptor
- a method descriptor.
- Returns:
- the Java type corresponding to the return type of the given method descriptor.
public int getSize()
Returns the size of values of this type.
- Returns:
- the size of values of this type, i.e., 2 for long and double, and 1 otherwise.
public int getSort()
Returns the sort of this Java type.
public static Type getType(Class c)
Returns the Java type corresponding to the given class.
- Parameters:
c
- a class.
- Returns:
- the Java type corresponding to the given class.
public static Type getType(String typeDescriptor)
Returns the Java type corresponding to the given type descriptor.
- Parameters:
typeDescriptor
- a type descriptor.
- Returns:
- the Java type corresponding to the given type descriptor.
public int hashCode()
Returns a hash code value for this type.
- Returns:
- a hash code value for this type.
public String toString()
Returns a string representation of this type.
- Returns:
- the descriptor of this type.