インタフェースjava.lang.constant.DirectMethodHandleDescの
使用
DirectMethodHandleDescを使用するパッケージ
パッケージ
説明
クラスやメソッド・ハンドルなどのランタイム・エンティティ用に「名目記述子」を表すクラスおよびインタフェース、および定数プール・エントリや
invokedynamicコール・サイトなどのクラス・ファイル・エンティティ用に「名目記述子」を表すクラスおよびインタフェース。-
java.lang.constantでのDirectMethodHandleDescの使用
DirectMethodHandleDescとして宣言されたjava.lang.constantのフィールド修飾子と型フィールド説明static DirectMethodHandleDescConstantDescs.BSM_ENUM_CONSTANTstatic DirectMethodHandleDescConstantDescs.BSM_EXPLICIT_CASTMethodHandleDescrepresentingConstantBootstraps.explicitCast(Lookup, String, Class, Object)ConstantBootstraps.explicitCast}static DirectMethodHandleDescConstantDescs.BSM_GET_STATIC_FINALstatic DirectMethodHandleDescConstantDescs.BSM_INVOKEstatic DirectMethodHandleDescConstantDescs.BSM_NULL_CONSTANTstatic DirectMethodHandleDescConstantDescs.BSM_PRIMITIVE_CLASSstatic DirectMethodHandleDescConstantDescs.BSM_VARHANDLE_ARRAYstatic DirectMethodHandleDescConstantDescs.BSM_VARHANDLE_FIELDstatic DirectMethodHandleDescConstantDescs.BSM_VARHANDLE_STATIC_FIELD修飾子と型メソッド説明DynamicConstantDesc.bootstrapMethod()この定数のブートストラップ・メソッドを記述するMethodHandleDescを返します。static DirectMethodHandleDescMethodHandleDesc.of(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, String lookupDescriptor)宣言されたメソッドの呼出し、コンストラクタの呼出し、またはフィールドへのアクセスに対応するMethodHandleDescを作成します。static DirectMethodHandleDescConstantDescs.ofCallsiteBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)invokedynamic呼出しサイトのブートストラップ・メソッドに対応するMethodHandleDescを返します。これは先頭のパラメータ・タイプがLookup、String、MethodTypeである静的メソッドです。static DirectMethodHandleDescConstantDescs.ofConstantBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)動的定数に対するブートストラップ・メソッドに対応するMethodHandleDescを返します。これは先行引数がLookup、String、Classであるstaticメソッドです。static DirectMethodHandleDescMethodHandleDesc.ofConstructor(ClassDesc owner, ClassDesc... paramTypes)コンストラクタの呼出しに対応するMethodHandleDescを返しますstatic DirectMethodHandleDescMethodHandleDesc.ofField(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String fieldName, ClassDesc fieldType)フィールドにアクセスするメソッド・ハンドルに対応するMethodHandleDescを作成します。static DirectMethodHandleDescMethodHandleDesc.ofMethod(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType)宣言されたメソッドまたはコンストラクタの呼出しに対応するMethodHandleDescを作成します。型DirectMethodHandleDescのパラメータを持つjava.lang.constantのメソッド修飾子と型メソッド説明static DynamicCallSiteDescDynamicCallSiteDesc.of(DirectMethodHandleDesc bootstrapMethod, MethodTypeDesc invocationType)ブートストラップ・メソッドに静的引数がなく、nameパラメータがConstantDescs.DEFAULT_NAMEのinvokedynamicコール・サイトに名目記述子を作成します。static DynamicCallSiteDescDynamicCallSiteDesc.of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType)ブートストラップ・メソッドに静的な引数がないinvokedynamicコール・サイトの名目記述子を作成します。static DynamicCallSiteDescDynamicCallSiteDesc.of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs)invokedynamiccallサイトの名目記述子を作成します。static <T> DynamicConstantDesc<T>DynamicConstantDesc.of(DirectMethodHandleDesc bootstrapMethod)ブートストラップが静的引数を持たない動的定数の名目記述子を返します。この値は、nameパラメータがConstantDescs.DEFAULT_NAMEで、typeパラメータは常にブートストラップ・メソッドの戻り型と同じです。static <T> DynamicConstantDesc<T>DynamicConstantDesc.of(DirectMethodHandleDesc bootstrapMethod, ConstantDesc... bootstrapArgs)名前パラメータがConstantDescs.DEFAULT_NAMEで、typeパラメータが常にブートストラップ・メソッドの戻り型と同じである動的定数の名目記述子を返します。static <T> ConstantDescDynamicConstantDesc.ofCanonical(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs)定数ブートストラップが既知の単一記述子で、より具体的な記述子タイプ(例: ClassDesc)が使用可能な場合は、動的定数の名目記述子を返し、より具体的な型に変換します。static <T> DynamicConstantDesc<T>DynamicConstantDesc.ofNamed(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)動的定数の名目記述子を返します。型DirectMethodHandleDescのパラメータを持つjava.lang.constantのコンストラクタ修飾子コンストラクタ説明protectedDynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)動的定数の名目記述子を作成します。