A Type may be used to represent a run-time type:
{@link Value}.type()or a compile-time type:
{@link Field#type()}
{@link Method#returnType()}
{@link Method#argumentTypes()}
{@link LocalVariable#type()}
{@link ArrayType#componentType()}
The following table illustrates which subinterfaces of Type are used to mirror types in the target VM --
Subinterfaces of {@link PrimitiveType} | ||
---|---|---|
Type declared in target as | Is mirrored as an instance of | |
boolean | {@link BooleanType} | |
byte | {@link ByteType} | |
char | {@link CharType} | |
double | {@link DoubleType} | |
float | {@link FloatType} | |
int | {@link IntegerType} | |
long | {@link LongType} | |
short | {@link ShortType} | |
void | {@link VoidType} | |
Subinterfaces of {@link ReferenceType} | ||
Type declared in target as | For example | Is mirrored as an instance of |
a class | Date | {@link ClassType} |
an interface | Runnable | {@link InterfaceType} |
an array | {@link ArrayType} | |
an array | int[] | {@link ArrayType} whose{@link ArrayType#componentType() componentType()} is{@link IntegerType} |
an array | Date[] | {@link ArrayType} whose{@link ArrayType#componentType() componentType()} is{@link ClassType} |
an array | Runnable[] | {@link ArrayType} whose{@link ArrayType#componentType() componentType()} is{@link InterfaceType} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|