Mirror
ArrayType
, BooleanType
, ByteType
, CharType
, ClassType
, DoubleType
, FloatType
, IntegerType
, InterfaceType
, LongType
, PrimitiveType
, ReferenceType
, ShortType
, VoidType
public interface Type extends Mirror
A Type may be used to represent a run-time type:
Value
.type()
or a compile-time type: Field.type()
Method.returnType()
Method.argumentTypes()
LocalVariable.type()
ArrayType.componentType()
The following tables illustrate which subinterfaces of Type are used to mirror types in the target VM --
Type declared in target as | Is mirrored as an instance of |
---|---|
boolean | BooleanType
|
byte | ByteType |
char | CharType |
double | DoubleType |
float | FloatType |
int | IntegerType |
long | LongType |
short | ShortType |
void | VoidType |
Type declared in target as | For example | Is mirrored as an instance of |
---|---|---|
a class | Date | ClassType |
an interface | Runnable | InterfaceType |
an array | (any) | ArrayType |
int[] |
ArrayType whose componentType() is IntegerType
| |
Date[] |
ArrayType whose componentType() is ClassType
| |
Runnable[] |
ArrayType whose componentType() is InterfaceType
|
toString, virtualMachine
String signature()
Class.descriptorString()
. The returned string is a type descriptor conforming to JVMS 4.3.2 if this type can be described nominally. Otherwise, the returned string is not a type descriptor.String name()
Class.getName()
. The returned name may not be a binary name.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.jdi/com/sun/jdi/Type.html