Package mockit.asm.types
Class MethodType
java.lang.Object
mockit.asm.types.JavaType
mockit.asm.types.ReferenceType
mockit.asm.types.MethodType
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodType
Returns the Java type corresponding to the given method descriptor.Returns the binary name of the class corresponding to this type.int
getOpcode
(int opcode) Returns a JVM instruction opcode adapted to this Java type.int
getSize()
Returns the size of values of this type.Methods inherited from class mockit.asm.types.ReferenceType
createFromInternalName, createFromTypeDescriptor, equals, getConstOpcode, getInternalName, getLoadOpcode, hashCode
Methods inherited from class mockit.asm.types.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: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 int getSize()Description copied from class:JavaType
Returns the size of values of this type. This method must not be used for method types.- Overrides:
getSize
in classReferenceType
- Returns:
- the size of values of this type, i.e., 2 for
long
anddouble
, 0 forvoid
and 1 otherwise.
-
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.- Overrides:
getOpcode
in 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
float
andopcode
is IRETURN, this method returns FRETURN.
-