Package com.strobel.assembler.metadata
Enum JvmType
- java.lang.Object
-
- java.lang.Enum<JvmType>
-
- com.strobel.assembler.metadata.JvmType
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<?>,JvmType>
CLASSES_TO_JVM_TYPES
-
Constructor Summary
Constructors Modifier Constructor Description private
JvmType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bitWidth()
static JvmType
forClass(java.lang.Class<?> clazz)
static JvmType
forValue(java.lang.Object value, boolean unboxPrimitives)
java.lang.String
getDescriptorPrefix()
java.lang.String
getPrimitiveName()
boolean
isDoubleWord()
boolean
isFloating()
boolean
isIntegral()
boolean
isNumeric()
boolean
isOther()
boolean
isPrimitive()
boolean
isPrimitiveOrVoid()
boolean
isSigned()
boolean
isSingleWord()
boolean
isSubWordOrInt32()
boolean
isUnsigned()
int
stackSlots()
static JvmType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JvmType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Boolean
public static final JvmType Boolean
-
Byte
public static final JvmType Byte
-
Character
public static final JvmType Character
-
Short
public static final JvmType Short
-
Integer
public static final JvmType Integer
-
Long
public static final JvmType Long
-
Float
public static final JvmType Float
-
Double
public static final JvmType Double
-
Object
public static final JvmType Object
-
Array
public static final JvmType Array
-
TypeVariable
public static final JvmType TypeVariable
-
Wildcard
public static final JvmType Wildcard
-
Void
public static final JvmType Void
-
-
Field Detail
-
CLASSES_TO_JVM_TYPES
private static final java.util.Map<java.lang.Class<?>,JvmType> CLASSES_TO_JVM_TYPES
-
-
Method Detail
-
values
public static JvmType[] 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 (JvmType c : JvmType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JvmType 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
-
getDescriptorPrefix
public final java.lang.String getDescriptorPrefix()
-
getPrimitiveName
public final java.lang.String getPrimitiveName()
-
isPrimitive
public final boolean isPrimitive()
-
isPrimitiveOrVoid
public final boolean isPrimitiveOrVoid()
-
bitWidth
public final int bitWidth()
-
stackSlots
public final int stackSlots()
-
isSingleWord
public final boolean isSingleWord()
-
isDoubleWord
public final boolean isDoubleWord()
-
isNumeric
public final boolean isNumeric()
-
isIntegral
public final boolean isIntegral()
-
isSubWordOrInt32
public final boolean isSubWordOrInt32()
-
isSigned
public final boolean isSigned()
-
isUnsigned
public final boolean isUnsigned()
-
isFloating
public final boolean isFloating()
-
isOther
public final boolean isOther()
-
forClass
public static JvmType forClass(java.lang.Class<?> clazz)
-
forValue
public static JvmType forValue(java.lang.Object value, boolean unboxPrimitives)
-
-