-
- All Superinterfaces:
-
Mirror
- All Known Subinterfaces:
-
ArrayType
,BooleanType
,ByteType
,CharType
,ClassType
,DoubleType
,FloatType
,IntegerType
,InterfaceType
,LongType
,PrimitiveType
,ReferenceType
,ShortType
,VoidType
public interface Type extends Mirror
目标VM中类型的镜像。 此接口是包含原始类型和引用类型的类型层次结构的根。A类型可用于表示运行时类型:
Value
.type()Field.type()
Method.returnType()
Method.argumentTypes()
LocalVariable.type()
ArrayType.componentType()
下表说明了哪些类型的子接口用于镜像目标VM中的类型 -
Maps each type declared in target to a mirrored instance of a subinterface of PrimitiveType or ReferenceType" Subinterfaces ofPrimitiveType
Type declared in target as Is mirrored as an instance ofboolean
BooleanType
byte
ByteType
char
CharType
double
DoubleType
float
FloatType
int
IntegerType
long
LongType
short
ShortType
void
VoidType
Subinterfaces ofReferenceType
Type declared in target as For example Is mirrored as an instance of a classDate
ClassType
an interfaceRunnable
InterfaceType
an arrayArrayType
an arrayint[]
ArrayType
whosecomponentType()
isIntegerType
an arrayDate[]
ArrayType
whosecomponentType()
isClassType
an arrayRunnable[]
ArrayType
whosecomponentType()
isInterfaceType
-
-
方法详细信息
-
signature
String signature()
返回此类型的JNI样式签名。对于原始类,返回的签名是相应原语类型的签名; 例如,作为由
Integer.TYPE
表示的类的签名返回“I”。- 结果
- 该字符串包含类型签名。
- 另请参见:
- Type Signatures
-
name
String name()
- 结果
- 这种类型的文本表示。
-
-