com.alibaba.fastjson.asm
类 Type

java.lang.Object
  继承者 com.alibaba.fastjson.asm.Type

public class Type
extends Object

A Java type. This class can be used to make it easier to manipulate type and method descriptors.

作者:
Eric Bruneton, Chris Nokleberg

字段摘要
static int ARRAY
          The sort of array reference types.
static int BOOLEAN
          The sort of the boolean type.
static Type BOOLEAN_TYPE
          The boolean type.
static int BYTE
          The sort of the byte type.
static Type BYTE_TYPE
          The byte type.
static int CHAR
          The sort of the char type.
static Type CHAR_TYPE
          The char type.
static int DOUBLE
          The sort of the double type.
static Type DOUBLE_TYPE
          The double type.
static int FLOAT
          The sort of the float type.
static Type FLOAT_TYPE
          The float type.
static int INT
          The sort of the int type.
static Type INT_TYPE
          The int type.
static int LONG
          The sort of the long type.
static Type LONG_TYPE
          The long type.
static int OBJECT
          The sort of object reference type.
static int SHORT
          The sort of the short type.
static Type SHORT_TYPE
          The short type.
static int VOID
          The sort of the void type.
static Type VOID_TYPE
          The void type.
 
方法摘要
static int getArgumentsAndReturnSizes(String desc)
          Computes the size of the arguments and of the return value of a method.
 String getInternalName()
          Returns the internal name of the class corresponding to this object or array type.
 int getSort()
          Returns the sort of this Java type.
static Type getType(String typeDescriptor)
          Returns the Java type corresponding to the given type descriptor.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

VOID

public static final int VOID
The sort of the void type. See getSort.

另请参见:
常量字段值

BOOLEAN

public static final int BOOLEAN
The sort of the boolean type. See getSort.

另请参见:
常量字段值

CHAR

public static final int CHAR
The sort of the char type. See getSort.

另请参见:
常量字段值

BYTE

public static final int BYTE
The sort of the byte type. See getSort.

另请参见:
常量字段值

SHORT

public static final int SHORT
The sort of the short type. See getSort.

另请参见:
常量字段值

INT

public static final int INT
The sort of the int type. See getSort.

另请参见:
常量字段值

FLOAT

public static final int FLOAT
The sort of the float type. See getSort.

另请参见:
常量字段值

LONG

public static final int LONG
The sort of the long type. See getSort.

另请参见:
常量字段值

DOUBLE

public static final int DOUBLE
The sort of the double type. See getSort.

另请参见:
常量字段值

ARRAY

public static final int ARRAY
The sort of array reference types. See getSort.

另请参见:
常量字段值

OBJECT

public static final int OBJECT
The sort of object reference type. See getSort.

另请参见:
常量字段值

VOID_TYPE

public static final Type VOID_TYPE
The void type.


BOOLEAN_TYPE

public static final Type BOOLEAN_TYPE
The boolean type.


CHAR_TYPE

public static final Type CHAR_TYPE
The char type.


BYTE_TYPE

public static final Type BYTE_TYPE
The byte type.


SHORT_TYPE

public static final Type SHORT_TYPE
The short type.


INT_TYPE

public static final Type INT_TYPE
The int type.


FLOAT_TYPE

public static final Type FLOAT_TYPE
The float type.


LONG_TYPE

public static final Type LONG_TYPE
The long type.


DOUBLE_TYPE

public static final Type DOUBLE_TYPE
The double type.

方法详细信息

getType

public static Type getType(String typeDescriptor)
Returns the Java type corresponding to the given type descriptor.

参数:
typeDescriptor - a type descriptor.
返回:
the Java type corresponding to the given type descriptor.

getArgumentsAndReturnSizes

public static int getArgumentsAndReturnSizes(String desc)
Computes the size of the arguments and of the return value of a method.

参数:
desc - the descriptor of a method.
返回:
the size of the arguments of the method (plus one for the implicit this argument), argSize, and the size of its return value, retSize, packed into a single int i = (argSize << 2) | retSize (argSize is therefore equal to i >> 2, and retSize to i & 0x03).

getSort

public int getSort()
Returns the sort of this Java type.

返回:
VOID, BOOLEAN, CHAR, BYTE, SHORT, INT, FLOAT, LONG, DOUBLE, ARRAY or OBJECT.

getInternalName

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.

返回:
the internal name of the class corresponding to this object type.


Copyright © 2012-2014 Alibaba Group. All Rights Reserved.