モジュール jdk.jdi
パッケージ com.sun.jdi

インタフェース・タイプ

すべてのスーパー・インタフェース:
Mirror
既知のすべてのサブインタフェース:
ArrayType, BooleanType, ByteType, CharType, ClassType, DoubleType, FloatType, IntegerType, InterfaceType, LongType, PrimitiveType, ReferenceType, ShortType, VoidType

public interface Type extends Mirror
ターゲットVM内に存在する特定の型のミラーです。 このインタフェースは、プリミティブ型と参照型の両方を含む型階層のルートです。

Typeオブジェクトは、次のような実行時の型を表現する場合に使用できます。

Value.type()
また、次のようなコンパイル時の型を表現する場合にも使用できます。
Field.type()
Method.returnType()
Method.argumentTypes()
LocalVariable.type()
ArrayType.componentType()

次の表は、TypeのサブインタフェースがターゲットVMの型をミラー・リングするために使用されることを示しています。

PrimitiveTypeのサブインタフェース
ターゲット内で宣言される型 次のインスタンスとしてミラー化される
boolean BooleanType
byte ByteType
char CharType
double DoubleType
float FloatType
int IntegerType
long LongType
short ShortType
void VoidType
ReferenceTypeのサブインタフェース
ターゲット内で宣言される型 次に例を示します 次のインスタンスとしてミラー化される
クラス Date ClassType
インタフェース Runnable InterfaceType
配列 (any) ArrayType
int[] ArrayType (componentType()IntegerType)
Date[] ArrayType (componentType()ClassType)
Runnable[] ArrayType (componentType()InterfaceType)

導入されたバージョン:
1.3
関連項目:
サブインタフェースPrimitiveType, サブインタフェースReferenceType, Value - TypeとValue間の関係, Field.type() - 使用例
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    この型の名前を返します。
    この型の型シグネチャを返します。

    インタフェース com.sun.jdi.Mirrorで宣言されたメソッド

    toString, virtualMachine
  • メソッドの詳細

    • signature

      String signature()
      この型の型シグネチャを返します。 結果は、Class.descriptorString()によって返される文字列と同じ形式です。 返される文字列は、JVMS 4.3.2に準拠する型記述子です(この型が名目的に記述できる場合)。 それ以外の場合、返される文字列は型記述子ではありません。
      戻り値:
      型シグネチャ
    • name

      String name()
      この型の名前を返します。 結果は、Class.getName()によって返される名前と同じ形式になります。 返される名前は「バイナリ名」ではない可能性があります。
      戻り値:
      この型の名前