Class PrimitiveType
java.lang.Object
mockit.asm.types.JavaType
mockit.asm.types.PrimitiveType
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic intgetArrayElementType(PrimitiveType elementType) Maps aPrimitiveTypeto the correspondingArrayElementType.Returns the binary name of the class corresponding to this type.intstatic PrimitiveTypeintintgetOpcode(int opcode) Returns a JVM instruction opcode adapted to this Java type.static PrimitiveTypegetPrimitiveType(int typeCode) @NonNegative intgetSize()Returns the size of values of this type.Class<?> getType()static Class<?> getType(int typeCode) charinthashCode()Methods inherited from class 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 aPrimitiveTypeto the correspondingArrayElementType. -
getTypeCode
public char getTypeCode() -
getType
-
getWrapperTypeDesc
-
getClassName
Description copied from class:JavaTypeReturns the binary name of the class corresponding to this type. This method must not be used on method types.- Specified by:
getClassNamein classJavaType
-
getSize
public @NonNegative int getSize()Description copied from class:JavaTypeReturns 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:JavaTypeReturns a JVM instruction opcode adapted to this Java type. This method must not be used for method types.- Specified by:
getOpcodein 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
floatandopcodeis IRETURN, this method returns FRETURN.
-
getLoadOpcode
public int getLoadOpcode()- Specified by:
getLoadOpcodein classJavaType
-
getConstOpcode
public int getConstOpcode()- Specified by:
getConstOpcodein classJavaType
-
equals
-
hashCode
-