Module java.base
Package java.lang.invoke
Interface TypeDescriptor.OfMethod<F extends TypeDescriptor.OfField<F>,M extends TypeDescriptor.OfMethod<F,M>>
- Type Parameters:
- F- the type representing field type descriptors
- M- the class implementing TypeDescriptor.OfMethod
- All Superinterfaces:
- TypeDescriptor
- All Known Subinterfaces:
- MethodTypeDesc
- All Known Implementing Classes:
- MethodType
- Enclosing interface:
- TypeDescriptor
public static interface TypeDescriptor.OfMethod<F extends TypeDescriptor.OfField<F>,M extends TypeDescriptor.OfMethod<F,M>> extends TypeDescriptor
An entity that has a method type descriptor
- See Java Virtual Machine Specification:
- 
4.3.2 Field Descriptors
 4.3.3 Method Descriptors
- Since:
- 12
- 
Nested Class SummaryNested classes/interfaces declared in interface java.lang.invoke.TypeDescriptorTypeDescriptor.OfField<F extends TypeDescriptor.OfField<F>>, TypeDescriptor.OfMethod<F extends TypeDescriptor.OfField<F>,M extends TypeDescriptor.OfMethod<F,M>>
- 
Method SummaryModifier and Type Method Description MchangeParameterType(int index, F paramType)Return a method descriptor that is identical to this one, except that a single parameter type has been changed to the specified type.MchangeReturnType(F newReturn)Return a method descriptor that is identical to this one, except that the return type has been changed to the specified typeMdropParameterTypes(int start, int end)Return a method descriptor that is identical to this one, except that a range of parameter types have been removed.MinsertParameterTypes(int pos, F... paramTypes)Return a method descriptor that is identical to this one, except that a range of additional parameter types have been inserted.F[]parameterArray()Return an array of field descriptors for the parameter types of the method type described by this descriptorintparameterCount()Return the number of parameters in the method typeList<F>parameterList()Return an immutable list of field descriptors for the parameter types of the method type described by this descriptorFparameterType(int i)Return a field descriptor describing the requested parameter of the method type described by this descriptorFreturnType()Return a field descriptor describing the return type of the method type described by this descriptor
- 
Method Details- 
parameterCountint parameterCount()Return the number of parameters in the method type- Returns:
- the number of parameters
 
- 
parameterTypeReturn a field descriptor describing the requested parameter of the method type described by this descriptor- Parameters:
- i- the index of the parameter
- Returns:
- a field descriptor for the requested parameter type
- Throws:
- IndexOutOfBoundsException- if the index is outside the half-open range {[0, parameterCount)}
 
- 
returnTypeF returnType()Return a field descriptor describing the return type of the method type described by this descriptor- Returns:
- a field descriptor for the return type
 
- 
parameterArrayF[] parameterArray()Return an array of field descriptors for the parameter types of the method type described by this descriptor- Returns:
- field descriptors for the parameter types
 
- 
parameterListReturn an immutable list of field descriptors for the parameter types of the method type described by this descriptor- Returns:
- field descriptors for the parameter types
 
- 
changeReturnTypeReturn a method descriptor that is identical to this one, except that the return type has been changed to the specified type- Parameters:
- newReturn- a field descriptor for the new return type
- Returns:
- the new method descriptor
- Throws:
- NullPointerException- if any argument is- null
 
- 
changeParameterTypeReturn a method descriptor that is identical to this one, except that a single parameter type has been changed to the specified type.- Parameters:
- index- the index of the parameter to change
- paramType- a field descriptor describing the new parameter type
- Returns:
- the new method descriptor
- Throws:
- NullPointerException- if any argument is- null
- IndexOutOfBoundsException- if the index is outside the half-open range {[0, parameterCount)}
 
- 
dropParameterTypesReturn a method descriptor that is identical to this one, except that a range of parameter types have been removed.- Parameters:
- start- the index of the first parameter to remove
- end- the index after the last parameter to remove
- Returns:
- the new method descriptor
- Throws:
- IndexOutOfBoundsException- if- startis outside the half-open range- [0, parameterCount), or- endis outside the closed range- [0, parameterCount], or if- start > end
 
- 
insertParameterTypesReturn a method descriptor that is identical to this one, except that a range of additional parameter types have been inserted.- Parameters:
- pos- the index at which to insert the first inserted parameter
- paramTypes- field descriptors describing the new parameter types to insert
- Returns:
- the new method descriptor
- Throws:
- NullPointerException- if any argument is- null
- IndexOutOfBoundsException- if- posis outside the closed range {[0, parameterCount]}
 
 
-