|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.rop.cst.Constant
com.android.dx.rop.cst.TypedConstant
com.android.dx.rop.cst.CstType
public final class CstType
Constants that represent an arbitrary type (reference or primitive).
| Field Summary | |
|---|---|
static CstType |
BOOLEAN
non-null; instance corresponding to the class Boolean |
static CstType |
BOOLEAN_ARRAY
non-null; instance corresponding to the type boolean[] |
static CstType |
BYTE
non-null; instance corresponding to the class Byte |
static CstType |
BYTE_ARRAY
non-null; instance corresponding to the type byte[] |
static CstType |
CHAR_ARRAY
non-null; instance corresponding to the type char[] |
static CstType |
CHARACTER
non-null; instance corresponding to the class Character |
static CstType |
DOUBLE
non-null; instance corresponding to the class Double |
static CstType |
DOUBLE_ARRAY
non-null; instance corresponding to the type double[] |
static CstType |
FLOAT
non-null; instance corresponding to the class Float |
static CstType |
FLOAT_ARRAY
non-null; instance corresponding to the type float[] |
static CstType |
INT_ARRAY
non-null; instance corresponding to the type int[] |
static CstType |
INTEGER
non-null; instance corresponding to the class Integer |
static CstType |
LONG
non-null; instance corresponding to the class Long |
static CstType |
LONG_ARRAY
non-null; instance corresponding to the type long[] |
static CstType |
OBJECT
non-null; instance corresponding to the class Object |
static CstType |
SHORT
non-null; instance corresponding to the class Short |
static CstType |
SHORT_ARRAY
non-null; instance corresponding to the type short[] |
static CstType |
VOID
non-null; instance corresponding to the class Void |
| Constructor Summary | |
|---|---|
CstType(Type type)
Constructs an instance. |
|
| Method Summary | |
|---|---|
protected int |
compareTo0(Constant other)
Compare the values of this and another instance, which are guaranteed to be of the same class. |
boolean |
equals(Object other)
|
static CstType |
forBoxedPrimitiveType(Type primitiveType)
Returns an instance of this class that represents the wrapper class corresponding to a given primitive type. |
Type |
getClassType()
Gets the underlying type (as opposed to the type corresponding to this instance as a constant, which is always Class). |
CstString |
getDescriptor()
Gets the type descriptor for this instance. |
Type |
getType()
Gets the type associated with this instance. |
int |
hashCode()
|
static CstType |
intern(Type type)
Returns an interned instance of this class for the given type. |
boolean |
isCategory2()
Returns true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1. |
String |
toHuman()
Return the "human" string form of this instance. |
String |
toString()
|
String |
typeName()
Returns the human name for the particular type of constant this instance is. |
| Methods inherited from class com.android.dx.rop.cst.TypedConstant |
|---|
getBasicFrameType, getBasicType, getFrameType, isConstant |
| Methods inherited from class com.android.dx.rop.cst.Constant |
|---|
compareTo |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final CstType OBJECT
non-null; instance corresponding to the class Object
public static final CstType BOOLEAN
non-null; instance corresponding to the class Boolean
public static final CstType BYTE
non-null; instance corresponding to the class Byte
public static final CstType CHARACTER
non-null; instance corresponding to the class Character
public static final CstType DOUBLE
non-null; instance corresponding to the class Double
public static final CstType FLOAT
non-null; instance corresponding to the class Float
public static final CstType LONG
non-null; instance corresponding to the class Long
public static final CstType INTEGER
non-null; instance corresponding to the class Integer
public static final CstType SHORT
non-null; instance corresponding to the class Short
public static final CstType VOID
non-null; instance corresponding to the class Void
public static final CstType BOOLEAN_ARRAY
non-null; instance corresponding to the type boolean[]
public static final CstType BYTE_ARRAY
non-null; instance corresponding to the type byte[]
public static final CstType CHAR_ARRAY
non-null; instance corresponding to the type char[]
public static final CstType DOUBLE_ARRAY
non-null; instance corresponding to the type double[]
public static final CstType FLOAT_ARRAY
non-null; instance corresponding to the type float[]
public static final CstType LONG_ARRAY
non-null; instance corresponding to the type long[]
public static final CstType INT_ARRAY
non-null; instance corresponding to the type int[]
public static final CstType SHORT_ARRAY
non-null; instance corresponding to the type short[]
| Constructor Detail |
|---|
public CstType(Type type)
type - non-null; the underlying type| Method Detail |
|---|
public static CstType forBoxedPrimitiveType(Type primitiveType)
Type.INT, this method returns the class reference
java.lang.Integer.
primitiveType - non-null; the primitive type
non-null; the corresponding wrapper classpublic static CstType intern(Type type)
type - non-null; the underlying type
non-null; an appropriately-constructed instancepublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectprotected int compareTo0(Constant other)
compareTo0 in class Constantother - non-null; the instance to compare to
-1, 0, or 1, as usual
for a comparisonpublic String toString()
toString in class Objectpublic Type getType()
non-null; the typepublic String typeName()
typeName in class Constantnon-null; the namepublic boolean isCategory2()
true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1.
isCategory2 in class Constanttrue iff this instance is category-2public String toHuman()
toString().
non-null; the human string formpublic Type getClassType()
Class).
non-null; the type corresponding to the namepublic CstString getDescriptor()
non-null; the descriptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||