-
- すべてのスーパー・インタフェース:
ConstantDesc
,TypeDescriptor
,TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
public interface MethodTypeDesc extends ConstantDesc, TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
MethodType定数の場合は「名目記述子」。- APIの注:
- 将来、Java言語が許可すると、MethodTypeDescが
sealed
インタフェースになる場合があり、明示的に許可されている型を除いてサブクラス化が禁止されます。 非プラットフォーム・クラスは、MethodTypeDescを直接実装することはできません。 - 導入されたバージョン:
- 12
-
-
ネストされたクラスのサマリー
-
インタフェースjava.lang.invoke.TypeDescriptorで宣言されたネストされたクラス/インタフェース
TypeDescriptor.OfField<F extends TypeDescriptor.OfField<F>>, TypeDescriptor.OfMethod<F extends TypeDescriptor.OfField<F>,M extends TypeDescriptor.OfMethod<F,M>>
-
-
メソッドのサマリー
修飾子と型 メソッド 説明 MethodTypeDesc
changeParameterType(int index, ClassDesc paramType)
このタイプと同一のMethodTypeDescを返します。ただし、指定されたタイプに変更されたパラメータ・タイプは1つのみです。MethodTypeDesc
changeReturnType(ClassDesc returnType)
指定された戻り型を除き、これと同一のMethodTypeDescを返します。default String
descriptorString()
メソッド・タイプ記述子文字列を返します。default String
displayDescriptor()
パラメータ・タイプおよび戻りタイプの正規名を使用して、このメソッド・タイプの判読可能な記述子を返します。MethodTypeDesc
dropParameterTypes(int start, int end)
パラメータ・タイプの範囲が削除されたことを除き、この方法と同じMethodTypeDescを返します。boolean
equals(Object o)
等価性のために、指定されたオブジェクトをこの記述子と比較します。MethodTypeDesc
insertParameterTypes(int pos, ClassDesc... paramTypes)
このパラメータ・タイプが追加されたことを除き、同じMethodTypeDescを返します。static MethodTypeDesc
of(ClassDesc returnDesc, ClassDesc... paramDescs)
戻り型およびパラメータ型が指定されたMethodTypeDescを返します。static MethodTypeDesc
ofDescriptor(String descriptor)
メソッド記述子文字列を指定してMethodTypeDescを作成します。ClassDesc[]
parameterArray()
配列としてパラメータ型を返します。int
parameterCount()
MethodTypeDescで説明されているメソッド型のパラメータ数を返します。List<ClassDesc>
parameterList()
不変のList
としてパラメータ型を返します。ClassDesc
parameterType(int index)
このMethodTypeDescで説明するメソッド・タイプのindex
番目のパラメータのパラメータ・タイプを返します。ClassDesc
returnType()
MethodTypeDescで記述されたメソッド・タイプの戻り型を取得します。-
インタフェースjava.lang.constant.ConstantDescで宣言されたメソッド
resolveConstantDesc
-
-
-
-
メソッドの詳細
-
ofDescriptor
static MethodTypeDesc ofDescriptor(String descriptor)
メソッド記述子文字列を指定してMethodTypeDescを作成します。- パラメータ:
descriptor
- メソッド記述子文字列- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
NullPointerException
- 引数が1つの場合はnull
IllegalArgumentException
- 記述子文字列が有効なメソッド記述子ではない場合- Java™仮想マシン仕様:
- 4.3.3メソッド記述子
-
of
static MethodTypeDesc of(ClassDesc returnDesc, ClassDesc... paramDescs)
戻り型およびパラメータ型が指定されたMethodTypeDescを返します。- パラメータ:
returnDesc
- 戻り型を説明するClassDescparamDescs
- ClassDesc s引数タイプの説明- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
NullPointerException
- 引数が1つの場合はnull
-
returnType
ClassDesc returnType()
MethodTypeDescで記述されたメソッド・タイプの戻り型を取得します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のreturnType
- 戻り値:
- メソッドの戻り型を説明する
ClassDesc
-
parameterCount
int parameterCount()
MethodTypeDescで説明されているメソッド型のパラメータ数を返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のparameterCount
- 戻り値:
- パラメータの数
-
parameterType
ClassDesc parameterType(int index)
このMethodTypeDescで説明するメソッド・タイプのindex
番目のパラメータのパラメータ・タイプを返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のparameterType
- パラメータ:
index
- 取得するパラメータの索引- 戻り値:
ClassDesc
必要なパラメータ・タイプの説明- 例外:
IndexOutOfBoundsException
- 索引が半オープン範囲外にある場合 {[0, parameterCount())}
-
parameterList
List<ClassDesc> parameterList()
不変のList
としてパラメータ型を返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のparameterList
- 戻り値:
- パラメータ型を説明する
ClassDesc
のList
-
parameterArray
ClassDesc[] parameterArray()
配列としてパラメータ型を返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のparameterArray
- 戻り値:
- パラメータ型を説明する
ClassDesc
の配列
-
changeReturnType
MethodTypeDesc changeReturnType(ClassDesc returnType)
指定された戻り型を除き、これと同一のMethodTypeDescを返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のchangeReturnType
- パラメータ:
returnType
- 新しい戻り型を説明するClassDesc
- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
NullPointerException
- 引数が1つの場合はnull
-
changeParameterType
MethodTypeDesc changeParameterType(int index, ClassDesc paramType)
このタイプと同一のMethodTypeDescを返します。ただし、指定されたタイプに変更されたパラメータ・タイプは1つのみです。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のchangeParameterType
- パラメータ:
index
- 変更するパラメータの索引paramType
- 新しいパラメータ・タイプを説明するClassDesc
- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
NullPointerException
- 引数が1つの場合はnull
IndexOutOfBoundsException
- 索引が半オープンの範囲外にある場合 {[0, parameterCount)}
-
dropParameterTypes
MethodTypeDesc dropParameterTypes(int start, int end)
パラメータ・タイプの範囲が削除されたことを除き、この方法と同じMethodTypeDescを返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のdropParameterTypes
- パラメータ:
start
- 削除する最初のパラメータの索引end
- 削除する最後のパラメータの後の索引- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
IndexOutOfBoundsException
-start
が半オープンの範囲 {[0, parameterCount)}の外側である場合、またはend
がクローズ範囲外にある場合[0, parameterCount]
-
insertParameterTypes
MethodTypeDesc insertParameterTypes(int pos, ClassDesc... paramTypes)
このパラメータ・タイプが追加されたことを除き、同じMethodTypeDescを返します。- 定義:
- インタフェース
TypeDescriptor.OfMethod<ClassDesc,MethodTypeDesc>
内のinsertParameterTypes
- パラメータ:
pos
- 最初に挿入されたパラメータを挿入する索引paramTypes
-ClassDesc
挿入する新しいパラメータ・タイプを記述- 戻り値:
- MethodTypeDesc必要なメソッド・タイプを記述
- 例外:
NullPointerException
- 引数が1つの場合はnull
IndexOutOfBoundsException
-pos
がクローズ範囲 {[0, parameterCount]}外にある場合
-
descriptorString
default String descriptorString()
メソッド・タイプ記述子文字列を返します。- 定義:
- インタフェース
TypeDescriptor
内のdescriptorString
- 戻り値:
- メソッド・タイプ記述子の文字列
- Java™仮想マシン仕様:
- 4.3.3メソッド記述子
-
displayDescriptor
default String displayDescriptor()
パラメータ・タイプおよび戻りタイプの正規名を使用して、このメソッド・タイプの判読可能な記述子を返します。- 戻り値:
- このメソッド・タイプの判読可能な記述子
-
equals
boolean equals(Object o)
等価性のために、指定されたオブジェクトをこの記述子と比較します。true
を返します。これは、指定されたオブジェクトがMethodTypeDescの両方で同じ引数を持つ場合、その戻り型が等しい場合と、対応するパラメータ型の各ペアが等しい場合のみです。- オーバーライド:
equals
、クラス:Object
- パラメータ:
o
- 他のオブジェクト- 戻り値:
- この記述子が他のオブジェクトと等しいかどうか
- 関連項目:
Object.hashCode()
、HashMap
-
-