Class TypedLiteral
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.parse.literal.TypedLiteral
- All Implemented Interfaces:
Dumpable
,TypeUsageCollectable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InferredJavaType
private final TypedLiteral.LiteralType
private final Object
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TypedLiteral
(TypedLiteral.LiteralType type, InferredJavaType inferredJavaType, Object value) -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
private static String
boolean
checkIntegerUsage
(RawJavaType rawType) void
collectTypeUsages
(TypeUsageCollector collector) dumpWithHint
(Dumper d, TypedLiteral.FormatHint hint) boolean
static TypedLiteral
getBoolean
(int v) boolean
static TypedLiteral
getChar
(int v) static TypedLiteral
static TypedLiteral
static TypedLiteral
static TypedLiteral
getDouble
(double v) double
static TypedLiteral
getFloat
(float v) float
static TypedLiteral
getInt
(int v) static TypedLiteral
getInt
(int v, InferredJavaType type) static TypedLiteral
getInt
(int v, RawJavaType type) int
static TypedLiteral
getLong
(long v) long
private static TypedLiteral
getMethodHandle
(ConstantPoolEntryMethodHandle methodHandle, ConstantPool cp) private static TypedLiteral
getMethodType
(ConstantPoolEntryMethodType methodType, ConstantPool cp) static TypedLiteral
getNull()
static TypedLiteral
getShort
(int v) static TypedLiteral
getType()
getValue()
private static boolean
private static String
integerName
(Object o, TypedLiteral.FormatHint formatHint) private static String
longName
(Object o, TypedLiteral.FormatHint formatHint) private static String
private static String
static TypedLiteral
shrinkTo
(TypedLiteral original, RawJavaType tgt) toString()
-
Field Details
-
inferredJavaType
-
type
-
value
-
-
Constructor Details
-
TypedLiteral
protected TypedLiteral(TypedLiteral.LiteralType type, InferredJavaType inferredJavaType, Object value)
-
-
Method Details
-
collectTypeUsages
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
-
integerName
-
getBoolValue
public boolean getBoolValue() -
getLongValue
public long getLongValue() -
getIntValue
public int getIntValue() -
getFloatValue
public float getFloatValue() -
getDoubleValue
public double getDoubleValue() -
getMaybeBoolValue
-
getMethodHandle
-
getClassValue
-
charName
-
boolName
-
hexTest
-
longName
-
methodHandleName
-
methodTypeName
-
dump
-
dumpWithHint
-
toString
-
getLong
-
getInt
-
getInt
-
getInt
-
getShort
-
getChar
-
getBoolean
-
getDouble
-
getFloat
-
getClass
-
getString
-
getNull
-
getMethodHandle
private static TypedLiteral getMethodHandle(ConstantPoolEntryMethodHandle methodHandle, ConstantPool cp) -
getMethodType
-
getConstantPoolEntryUTF8
-
getConstantPoolEntry
-
shrinkTo
-
getType
-
getValue
-
getInferredJavaType
-
checkIntegerUsage
-
equals
-