インタフェースjava.lang.constant.MethodTypeDescの
使用
MethodTypeDescを使用するパッケージ
パッケージ
説明
クラスやメソッド・ハンドルなどのランタイム・エンティティ用に「名目記述子」を表すクラスおよびインタフェース、および定数プール・エントリや
invokedynamicコール・サイトなどのクラス・ファイル・エンティティ用に「名目記述子」を表すクラスおよびインタフェース。java.lang.invokeパッケージは、Java Virtual Machineとやりとりするための低レベルのプリミティブを提供します。-
java.lang.constantでのMethodTypeDescの使用
MethodTypeDescを返すjava.lang.constantのメソッド修飾子と型メソッド説明MethodTypeDesc.changeParameterType(int index, ClassDesc paramType) このタイプと同一のMethodTypeDescを返します。ただし、指定されたタイプに変更されたパラメータ・タイプは1つのみです。MethodTypeDesc.changeReturnType(ClassDesc returnType) 指定された戻り型を除き、これと同一のMethodTypeDescを返します。MethodTypeDesc.dropParameterTypes(int start, int end) パラメータ・タイプの範囲が削除されたことを除き、この方法と同じMethodTypeDescを返します。MethodTypeDesc.insertParameterTypes(int pos, ClassDesc... paramTypes) このパラメータ・タイプが追加されたことを除き、同じMethodTypeDescを返します。DynamicCallSiteDesc.invocationType()invokedynamicのNameAndTypeオペランドに表示される呼び出しタイプを示すMethodTypeDescを返します。MethodHandleDesc.invocationType()この名目記述子で記述されるメソッド・ハンドルの呼出しタイプを記述するMethodTypeDescを返します。static MethodTypeDesc戻り型およびパラメータ型が指定されたMethodTypeDescを返します。static MethodTypeDescMethodTypeDesc.ofDescriptor(String descriptor) メソッド記述子文字列を指定してMethodTypeDescを作成します。型MethodTypeDescのパラメータを持つjava.lang.constantのメソッド修飾子と型メソッド説明default MethodHandleDescMethodHandleDesc.asType(MethodTypeDesc type) MethodHandle.asType(MethodType)が適応するこのメソッド・ハンドルを説明するMethodHandleDescを返します。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 DirectMethodHandleDescMethodHandleDesc.ofMethod(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType) 宣言されたメソッドまたはコンストラクタの呼出しに対応するMethodHandleDescを作成します。DynamicCallSiteDesc.withNameAndType(String invocationName, MethodTypeDesc invocationType) ブートストラップおよびブートストラップ引数がこれと同じですが、指定されたinvocationNameと呼出しinvocationTypeを使用して、invokedynamicコール・サイトの名目記述子を返します -
java.lang.invokeでのMethodTypeDescの使用
型MethodTypeDescの引数を持つ型を返すjava.lang.invokeのメソッド