public class Type extends Object
equals(Object) to
 compare type instances.
 In most cases, applications which consume this API, only need to call getCtClass()
 to obtain the needed type information.| Modifier and Type | Field and Description | 
|---|---|
| static Type | BOGUSRepresents a non-accessible value. | 
| static Type | BOOLEANRepresents the boolean primitive type | 
| static Type | BYTERepresents the byte primitive type | 
| static Type | CHARRepresents the char primitive type | 
| static Type | CLONEABLERepresents the java.lang.Coneable reference type | 
| static Type | DOUBLERepresents the double primitive type | 
| static Type | FLOATRepresents the float primitive type | 
| static Type | INTEGERRepresents the integer primitive type | 
| static Type | LONGRepresents the long primitive type | 
| static Type | OBJECTRepresents the java.lang.Object reference type | 
| static Type | RETURN_ADDRESSRepresents an internal JVM return address, which is used by the RET
 instruction to return to a JSR that invoked the subroutine. | 
| static Type | SERIALIZABLERepresents the java.io.Serializable reference type | 
| static Type | SHORTRepresents the short primitive type | 
| static Type | THROWABLERepresents the java.lang.Throwable reference type | 
| static Type | TOPA placeholder used by the analyzer for the second word position of a double-word type | 
| static Type | UNINITRepresents an unknown, or null type. | 
| static Type | VOIDRepresents the void primitive type | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| static Type | get(CtClass clazz)Obtain the Type for a given class. | 
| Type | getComponent()Returns the array component if this type is an array. | 
| CtClass | getCtClass()Returns the class this type represents. | 
| int | getDimensions()Returns the number of dimensions of this array. | 
| int | getSize()Gets the word size of this type. | 
| boolean | isArray()Returns whether or not this type is an array. | 
| boolean | isAssignableFrom(Type type)Determines whether this type is assignable, to the passed type. | 
| boolean | isReference()Returns whether or not this type is a normal java reference, i.e. | 
| boolean | isSpecial()Returns whether or not the type is special. | 
| Type | merge(Type type)Finds the common base type, or interface which both this and the specified
 type can be assigned. | 
| String | toString() | 
public static final Type DOUBLE
public static final Type BOOLEAN
public static final Type LONG
public static final Type CHAR
public static final Type BYTE
public static final Type SHORT
public static final Type INTEGER
public static final Type FLOAT
public static final Type VOID
public static final Type UNINIT
public static final Type RETURN_ADDRESS
public static final Type TOP
public static final Type BOGUS
public static final Type OBJECT
public static final Type SERIALIZABLE
public static final Type CLONEABLE
public static final Type THROWABLE
public static Type get(CtClass clazz)
clazz - The java classpublic int getSize()
public CtClass getCtClass()
public boolean isReference()
public boolean isSpecial()
public boolean isArray()
public int getDimensions()
public Type getComponent()
public boolean isAssignableFrom(Type type)
type - the type to test assignability topublic Type merge(Type type)
MultiType,
 or a MultiArrayType is returned. Multi-types have special rules,
 and successive merges and assignment tests on them will alter their internal state,
 as well as other multi-types they have been merged with. This method is used by
 the data-flow analyzer to merge the type state from multiple branches.type - the type to merge withCopyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.