Enum RawJavaType
- java.lang.Object
-
- java.lang.Enum<RawJavaType>
-
- org.benf.cfr.reader.bytecode.analysis.types.RawJavaType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RawJavaType>
,JavaTypeInstance
public enum RawJavaType extends java.lang.Enum<RawJavaType> implements JavaTypeInstance
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
RawJavaType.Annotated
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
boxedName
private static java.util.Map<java.lang.String,RawJavaType>
boxingTypes
private static java.util.Map<RawJavaType,java.util.Set<RawJavaType>>
implicitCasts
private int
intMax
private int
intMin
private boolean
isNumber
private boolean
isObject
private java.lang.String
name
private static java.util.Map<java.lang.String,RawJavaType>
podLookup
private StackType
stackType
private java.lang.String
suggestedVarName
private boolean
usableType
-
Constructor Summary
Constructors Modifier Constructor Description private
RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, boolean objectType)
private
RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, java.lang.String boxedName, boolean isNumber, boolean objectType)
private
RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, java.lang.String boxedName, boolean isNumber, boolean objectType, int intMin, int intMax)
-
Method Summary
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final RawJavaType BOOLEAN
-
BYTE
public static final RawJavaType BYTE
-
CHAR
public static final RawJavaType CHAR
-
SHORT
public static final RawJavaType SHORT
-
INT
public static final RawJavaType INT
-
LONG
public static final RawJavaType LONG
-
FLOAT
public static final RawJavaType FLOAT
-
DOUBLE
public static final RawJavaType DOUBLE
-
VOID
public static final RawJavaType VOID
-
REF
public static final RawJavaType REF
-
RETURNADDRESS
public static final RawJavaType RETURNADDRESS
-
RETURNADDRESSORREF
public static final RawJavaType RETURNADDRESSORREF
-
NULL
public static final RawJavaType NULL
-
-
Field Detail
-
name
private final java.lang.String name
-
suggestedVarName
private final java.lang.String suggestedVarName
-
stackType
private final StackType stackType
-
usableType
private final boolean usableType
-
boxedName
private final java.lang.String boxedName
-
isNumber
private final boolean isNumber
-
isObject
private final boolean isObject
-
intMin
private final int intMin
-
intMax
private final int intMax
-
implicitCasts
private static final java.util.Map<RawJavaType,java.util.Set<RawJavaType>> implicitCasts
-
boxingTypes
private static final java.util.Map<java.lang.String,RawJavaType> boxingTypes
-
podLookup
private static final java.util.Map<java.lang.String,RawJavaType> podLookup
-
-
Constructor Detail
-
RawJavaType
private RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, java.lang.String boxedName, boolean isNumber, boolean objectType, int intMin, int intMax)
-
RawJavaType
private RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, java.lang.String boxedName, boolean isNumber, boolean objectType)
-
RawJavaType
private RawJavaType(java.lang.String name, java.lang.String suggestedVarName, StackType stackType, boolean usableType, boolean objectType)
-
-
Method Detail
-
values
public static RawJavaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RawJavaType c : RawJavaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RawJavaType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getUnboxedTypeFor
public static RawJavaType getUnboxedTypeFor(JavaTypeInstance type)
-
getPodNamedType
public static RawJavaType getPodNamedType(java.lang.String name)
-
getName
public java.lang.String getName()
-
getAnnotatedInstance
public JavaAnnotatedTypeInstance getAnnotatedInstance()
- Specified by:
getAnnotatedInstance
in interfaceJavaTypeInstance
-
getStackType
public StackType getStackType()
- Specified by:
getStackType
in interfaceJavaTypeInstance
-
isComplexType
public boolean isComplexType()
- Specified by:
isComplexType
in interfaceJavaTypeInstance
-
isObject
public boolean isObject()
- Specified by:
isObject
in interfaceJavaTypeInstance
-
asGenericRefInstance
public JavaGenericRefTypeInstance asGenericRefInstance(JavaTypeInstance other)
- Specified by:
asGenericRefInstance
in interfaceJavaTypeInstance
-
directImplOf
public JavaTypeInstance directImplOf(JavaTypeInstance other)
- Specified by:
directImplOf
in interfaceJavaTypeInstance
-
deObfuscate
public JavaTypeInstance deObfuscate(ObfuscationTypeMap obfuscationTypeMap)
- Specified by:
deObfuscate
in interfaceJavaTypeInstance
-
inIntRange
public boolean inIntRange(int value)
-
isRaw
public boolean isRaw()
- Specified by:
isRaw
in interfaceJavaTypeInstance
-
compareTypePriorityTo
public int compareTypePriorityTo(RawJavaType other)
-
compareAllPriorityTo
public int compareAllPriorityTo(RawJavaType other)
-
isUsableType
public boolean isUsableType()
- Specified by:
isUsableType
in interfaceJavaTypeInstance
-
isNumber
public boolean isNumber()
-
getRawTypeOfSimpleType
public RawJavaType getRawTypeOfSimpleType()
- Specified by:
getRawTypeOfSimpleType
in interfaceJavaTypeInstance
-
removeAnArrayIndirection
public JavaTypeInstance removeAnArrayIndirection()
- Specified by:
removeAnArrayIndirection
in interfaceJavaTypeInstance
-
getArrayStrippedType
public JavaTypeInstance getArrayStrippedType()
- Specified by:
getArrayStrippedType
in interfaceJavaTypeInstance
-
getDeGenerifiedType
public JavaTypeInstance getDeGenerifiedType()
- Specified by:
getDeGenerifiedType
in interfaceJavaTypeInstance
-
getNumArrayDimensions
public int getNumArrayDimensions()
- Specified by:
getNumArrayDimensions
in interfaceJavaTypeInstance
-
getRawName
public java.lang.String getRawName()
- Specified by:
getRawName
in interfaceJavaTypeInstance
-
getRawName
public java.lang.String getRawName(IllegalIdentifierDump iid)
- Specified by:
getRawName
in interfaceJavaTypeInstance
-
getInnerClassHereInfo
public InnerClassInfo getInnerClassHereInfo()
- Specified by:
getInnerClassHereInfo
in interfaceJavaTypeInstance
-
getBindingSupers
public BindingSuperContainer getBindingSupers()
- Specified by:
getBindingSupers
in interfaceJavaTypeInstance
-
implicitlyCastsTo
private boolean implicitlyCastsTo(RawJavaType other)
-
implicitlyCastsTo
public boolean implicitlyCastsTo(JavaTypeInstance other, GenericTypeBinder gtb)
- Specified by:
implicitlyCastsTo
in interfaceJavaTypeInstance
-
impreciseCanCastTo
public boolean impreciseCanCastTo(JavaTypeInstance other, GenericTypeBinder gtb)
- Specified by:
impreciseCanCastTo
in interfaceJavaTypeInstance
-
correctCanCastTo
public boolean correctCanCastTo(JavaTypeInstance other, GenericTypeBinder gtb)
- Specified by:
correctCanCastTo
in interfaceJavaTypeInstance
-
suggestVarName
public java.lang.String suggestVarName()
- Specified by:
suggestVarName
in interfaceJavaTypeInstance
-
dumpInto
public void dumpInto(Dumper d, TypeUsageInformation typeUsageInformation, TypeContext typeContext)
- Specified by:
dumpInto
in interfaceJavaTypeInstance
-
collectInto
public void collectInto(TypeUsageCollector typeUsageCollector)
- Specified by:
collectInto
in interfaceJavaTypeInstance
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<RawJavaType>
-
-