Package mockit.asm.types
Class ReferenceType
java.lang.Object
mockit.asm.types.JavaType
mockit.asm.types.ReferenceType
- Direct Known Subclasses:
ArrayType
,MethodType
,ObjectType
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReferenceType
createFromInternalName
(String internalName) Returns the object or array type corresponding to the given internal name.static ReferenceType
createFromTypeDescriptor
(String typeDesc) Returns the Java type corresponding to the given type descriptor.final boolean
final int
final String
Returns the internal name of the class corresponding to this object or array type.final int
int
getOpcode
(int opcode) Returns a JVM instruction opcode adapted to this Java type.int
getSize()
Returns the size of values of this type.final int
hashCode()
Methods inherited from class mockit.asm.types.JavaType
getArgumentsAndReturnSizes, getArgumentTypes, getClassName, getConstructorDescriptor, getDescriptor, getInternalName, getMethodDescriptor, getReturnType, getType, toString
-
Method Details
-
createFromTypeDescriptor
Returns the Java type corresponding to the given type descriptor.- Parameters:
typeDesc
- a type descriptor.
-
createFromInternalName
Returns the object or array type corresponding to the given internal name. -
getInternalName
Returns the internal name of the class corresponding to this object or array type. The internal name of a class is its fully qualified name (as returned by Class.getName(), where '.' are replaced by '/'. For an array type, it starts with "[" and ends with the type descriptor of the array element type.- Returns:
- the internal name of the class corresponding to this object or array type.
-
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. -
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 final int getLoadOpcode()- Specified by:
getLoadOpcode
in classJavaType
-
getConstOpcode
public final int getConstOpcode()- Specified by:
getConstOpcode
in classJavaType
-
equals
-
hashCode
public final int hashCode()
-