Fields Summary |
---|
private static final HashMap | internsnon-null; map of interned types |
public static final CstType | OBJECTnon-null; instance corresponding to the class Object |
public static final CstType | BOOLEANnon-null; instance corresponding to the class Boolean |
public static final CstType | BYTEnon-null; instance corresponding to the class Byte |
public static final CstType | CHARACTERnon-null; instance corresponding to the class Character |
public static final CstType | DOUBLEnon-null; instance corresponding to the class Double |
public static final CstType | FLOATnon-null; instance corresponding to the class Float |
public static final CstType | LONGnon-null; instance corresponding to the class Long |
public static final CstType | INTEGERnon-null; instance corresponding to the class Integer |
public static final CstType | SHORTnon-null; instance corresponding to the class Short |
public static final CstType | VOIDnon-null; instance corresponding to the class Void |
public static final CstType | BOOLEAN_ARRAYnon-null; instance corresponding to the type boolean[] |
public static final CstType | BYTE_ARRAYnon-null; instance corresponding to the type byte[] |
public static final CstType | CHAR_ARRAYnon-null; instance corresponding to the type char[] |
public static final CstType | DOUBLE_ARRAYnon-null; instance corresponding to the type double[] |
public static final CstType | FLOAT_ARRAYnon-null; instance corresponding to the type float[] |
public static final CstType | LONG_ARRAYnon-null; instance corresponding to the type long[] |
public static final CstType | INT_ARRAYnon-null; instance corresponding to the type int[] |
public static final CstType | SHORT_ARRAYnon-null; instance corresponding to the type short[] |
private final com.android.dx.rop.type.Type | typenon-null; the underlying type |
private CstUtf8 | descriptornull-ok; the type descriptor corresponding to this instance, if
calculated |
Methods Summary |
---|
protected int | compareTo0(Constant other){@inheritDoc}
String thisDescriptor = type.getDescriptor();
String otherDescriptor = ((CstType) other).type.getDescriptor();
return thisDescriptor.compareTo(otherDescriptor);
|
public boolean | equals(java.lang.Object other){@inheritDoc}
if (!(other instanceof CstType)) {
return false;
}
return type == ((CstType) other).type;
|
public static com.android.dx.rop.cst.CstType | forBoxedPrimitiveType(com.android.dx.rop.type.Type primitiveType)Returns an instance of this class that represents the wrapper
class corresponding to a given primitive type. For example, if
given {@link Type#INT}, this method returns the class reference
java.lang.Integer .
switch (primitiveType.getBasicType()) {
case Type.BT_BOOLEAN: return BOOLEAN;
case Type.BT_BYTE: return BYTE;
case Type.BT_CHAR: return CHARACTER;
case Type.BT_DOUBLE: return DOUBLE;
case Type.BT_FLOAT: return FLOAT;
case Type.BT_INT: return INTEGER;
case Type.BT_LONG: return LONG;
case Type.BT_SHORT: return SHORT;
case Type.BT_VOID: return VOID;
}
throw new IllegalArgumentException("not primitive: " + primitiveType);
|
public com.android.dx.rop.type.Type | getClassType()Gets the underlying type (as opposed to the type corresponding
to this instance as a constant, which is always
Class ).
return type;
|
public CstUtf8 | getDescriptor()Gets the type descriptor for this instance.
if (descriptor == null) {
descriptor = new CstUtf8(type.getDescriptor());
}
return descriptor;
|
public com.android.dx.rop.type.Type | getType(){@inheritDoc}
return Type.CLASS;
|
public int | hashCode(){@inheritDoc}
return type.hashCode();
|
public static com.android.dx.rop.cst.CstType | intern(com.android.dx.rop.type.Type type)Returns an interned instance of this class for the given type.
CstType cst = interns.get(type);
if (cst == null) {
cst = new CstType(type);
interns.put(type, cst);
}
return cst;
|
public boolean | isCategory2(){@inheritDoc}
return false;
|
public java.lang.String | toHuman(){@inheritDoc}
return type.toHuman();
|
public java.lang.String | toString(){@inheritDoc}
return "type{" + toHuman() + '}";
|
public java.lang.String | typeName(){@inheritDoc}
return "type";
|