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
 Method descriptors conforming to JVMS 4.3.3 can be described
 nominally via 
MethodType::describeConstable;
 otherwise they cannot be described nominally.- 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 TypeMethodDescriptionchangeParameterType(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.changeReturnType(F newReturn) Return a method descriptor that is identical to this one, except that the return type has been changed to the specified typedropParameterTypes(int start, int end) Return a method descriptor that is identical to this one, except that a range of parameter types have been removed.insertParameterTypes(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[]Return an array of field descriptors for the parameter types of the method type described by this descriptorintReturn the number of parameters in the method typeReturn an immutable list of field descriptors for the parameter types of the method type described by this descriptorparameterType(int i) Return a field descriptor describing the requested parameter of the method type described by this descriptorReturn a field descriptor describing the return type of the method type described by this descriptorMethods declared in interface java.lang.invoke.TypeDescriptordescriptorString
- 
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
 
- 
parameterList
- 
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]}
 
 
-