Class MethodType
java.lang.Object
mockit.asm.types.JavaType
mockit.asm.types.ReferenceType
mockit.asm.types.MethodType
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodTypeReturns the Java type corresponding to the given method descriptor.Returns the binary name of the class corresponding to this type.intgetOpcode(int opcode) Returns a JVM instruction opcode adapted to this Java type.intgetSize()Returns the size of values of this type.Methods inherited from class ReferenceType
createFromInternalName, createFromTypeDescriptor, equals, getConstOpcode, getInternalName, getLoadOpcode, hashCodeMethods inherited from class JavaType
getArgumentsAndReturnSizes, getArgumentTypes, getConstructorDescriptor, getDescriptor, getInternalName, getMethodDescriptor, getReturnType, getType, toString
-
Method Details
-
create
Returns the Java type corresponding to the given method descriptor. -
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 int getSize()Description copied from class:JavaTypeReturns the size of values of this type. This method must not be used for method types.- Overrides:
getSizein classReferenceType- Returns:
- the size of values of this type, i.e., 2 for
longanddouble, 0 forvoidand 1 otherwise.
-
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.- Overrides:
getOpcodein classReferenceType- 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.
-