Package mockit.asm.types
Class PrimitiveType
java.lang.Object
mockit.asm.types.JavaType
mockit.asm.types.PrimitiveType
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static int
getArrayElementType
(PrimitiveType elementType) Maps aPrimitiveType
to the correspondingArrayElementType
.Returns the binary name of the class corresponding to this type.int
static PrimitiveType
int
int
getOpcode
(int opcode) Returns a JVM instruction opcode adapted to this Java type.static PrimitiveType
getPrimitiveType
(int typeCode) @org.checkerframework.checker.index.qual.NonNegative int
getSize()
Returns the size of values of this type.Class
<?> getType()
static Class
<?> getType
(int typeCode) char
int
hashCode()
Methods inherited from class mockit.asm.types.JavaType
getArgumentsAndReturnSizes, getArgumentTypes, getConstructorDescriptor, getDescriptor, getInternalName, getMethodDescriptor, getReturnType, getType, toString
-
Method Details
-
getPrimitiveType
-
getCorrespondingPrimitiveTypeIfWrapperType
@Nullable public static PrimitiveType getCorrespondingPrimitiveTypeIfWrapperType(@NonNull String typeDesc) -
getType
-
getArrayElementType
Maps aPrimitiveType
to the correspondingArrayElementType
. -
getTypeCode
public char getTypeCode() -
getType
-
getWrapperTypeDesc
-
getClassName
Description copied from class:JavaType
Returns the binary name of the class corresponding to this type. This method must not be used on method types.- Specified by:
getClassName
in classJavaType
-
getSize
public @org.checkerframework.checker.index.qual.NonNegative int getSize()Description copied from class:JavaType
Returns the size of values of this type. This method must not be used for method types. -
getOpcode
public int getOpcode(int opcode) Description copied from class:JavaType
Returns a JVM instruction opcode adapted to this Java type. This method must not be used for method types.- Specified by:
getOpcode
in classJavaType
- Parameters:
opcode
- a JVM instruction opcode. This opcode must be one of ILOAD, ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR and IRETURN.- Returns:
- an opcode that is similar to the given opcode, but adapted to this Java type. For example, if this type
is
float
andopcode
is IRETURN, this method returns FRETURN.
-
getLoadOpcode
public int getLoadOpcode()- Specified by:
getLoadOpcode
in classJavaType
-
getConstOpcode
public int getConstOpcode()- Specified by:
getConstOpcode
in classJavaType
-
equals
-
hashCode
public int hashCode()
-