MethodType (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Constable, TypeDescriptor, TypeDescriptor.OfMethod<Class<?>, MethodType>
-
Nested Class Summary
Nested classes/interfaces declared in interface TypeDescriptor
TypeDescriptor.OfField<F>, TypeDescriptor.OfMethod<F,M> static interfaceAn entity that has a field type descriptor.
static interfaceAn 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. -
Method Summary
appendParameterTypes(Class<?>... ptypesToInsert) Finds or creates a method type with additional parameter types.
Finds or creates a method type with additional parameter types.
changeParameterType(int num, Class<?> nptype) Finds or creates a method type with a single different parameter type.
Finds or creates a method type with a different return type.
Returns a nominal descriptor for this instance, if one can be constructed, or an empty
Optionalif one cannot be.Returns the descriptor string for this method type.
dropParameterTypes(int start, int end) Finds or creates a method type with some parameter types omitted.
booleanCompares the specified object with this type for equality.
erase()Erases all reference types to
Object.Finds or creates an instance of a method type of the given method descriptor (JVMS 4.3.3).
generic()Converts all types, both reference and primitive, to
Object.genericMethodType(int objectArgCount) Finds or creates a method type whose components are all
Object.genericMethodType(int objectArgCount, boolean finalArray) Finds or creates a method type whose components are
Objectwith an optional trailingObject[]array.inthashCode()Returns the hash code value for this method type.
booleanReports if this type contains a primitive argument or return value.
booleanReports if this type contains a wrapper argument or return value.
insertParameterTypes(int num, Class<?>... ptypesToInsert) Finds or creates a method type with additional parameter types.
Finds or creates a method type with additional parameter types.
Returns the last parameter type of this method type.
Finds or creates a method type with the given components.
Finds or creates a method type with the given components.
Finds or creates an instance of the given method type.
Finds or creates a method type with the given components.
Finds or creates a method type with the given components.
Finds or creates a method type with the given components.
Presents the parameter types as an array (a convenience method).
intReturns the number of parameter types in this method type.
Presents the parameter types as a list (a convenience method).
parameterType(int num) Returns the parameter type at the specified index, within this method type.
Returns the return type of this method type.
Returns the descriptor string for this method type.
toString()Returns a string representation of the method type, of the form
"(PT0,PT1...)RT".unwrap()Converts all wrapper types to their corresponding primitive types.
wrap()Converts all primitive types to their corresponding wrapper types.
Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Method Details
-
methodType
-
methodType
-
methodType
-
methodType
-
methodType
-
methodType
-
genericMethodType
-
genericMethodType
-
changeParameterType
-
insertParameterTypes
-
appendParameterTypes
-
insertParameterTypes
-
appendParameterTypes
-
dropParameterTypes
-
changeReturnType
-
hasPrimitives
-
hasWrappers
-
erase
-
generic
-
wrap
-
unwrap
-
parameterType
-
parameterCount
-
returnType
-
parameterList
-
lastParameterType
-
parameterArray
-
equals
-
hashCode
-
toString
-
fromMethodDescriptorString
-
toMethodDescriptorString
-
descriptorString
-
describeConstable
-