public final class CstType extends TypedConstant
| Modifier and Type | Field and Description |
|---|---|
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 |
METHOD_HANDLE
non-null; instance corresponding to the type java.lang.invoke.MethodHandle |
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 |
VAR_HANDLE
non-null; instance corresponding to the type java.lang.invoke.VarHandle |
static CstType |
VOID
non-null; instance corresponding to the class Void |
| Constructor and Description |
|---|
CstType(Type type)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearInternTable() |
protected int |
compareTo0(Constant other)
Compare the values of this and another instance, which are guaranteed
to be of the same class.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
getPackageName()
Returns a human readable package name for this type, like "java.util".
|
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. |
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
java.lang.String |
toString() |
java.lang.String |
typeName()
Returns the human name for the particular type of constant
this instance is.
|
getBasicFrameType, getBasicType, getFrameType, isConstantpublic static final CstType OBJECT
non-null; instance corresponding to the class Objectpublic static final CstType BOOLEAN
non-null; instance corresponding to the class Booleanpublic static final CstType BYTE
non-null; instance corresponding to the class Bytepublic static final CstType CHARACTER
non-null; instance corresponding to the class Characterpublic static final CstType DOUBLE
non-null; instance corresponding to the class Doublepublic static final CstType FLOAT
non-null; instance corresponding to the class Floatpublic static final CstType LONG
non-null; instance corresponding to the class Longpublic static final CstType INTEGER
non-null; instance corresponding to the class Integerpublic static final CstType SHORT
non-null; instance corresponding to the class Shortpublic static final CstType VOID
non-null; instance corresponding to the class Voidpublic 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[]public static final CstType METHOD_HANDLE
non-null; instance corresponding to the type java.lang.invoke.MethodHandlepublic static final CstType VAR_HANDLE
non-null; instance corresponding to the type java.lang.invoke.VarHandlepublic CstType(Type type)
type - non-null; the underlying typepublic static CstType forBoxedPrimitiveType(Type primitiveType)
Type.INT, this method returns the class reference
java.lang.Integer.primitiveType - non-null; the primitive typenon-null; the corresponding wrapper classpublic static CstType intern(Type type)
type - non-null; the underlying typenon-null; an appropriately-constructed instancepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic Type getType()
non-null; the typepublic java.lang.String typeName()
public 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 java.lang.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 descriptorpublic java.lang.String getPackageName()
public static void clearInternTable()
Copyright © 2020. All Rights Reserved.