Interface MethodSignature
public sealed interface MethodSignature
Models the generic signature of a method or constructor, as defined by JVMS
 4.7.9.1.
- See Java Language Specification:
- 
8.4 Method Declarations
 8.8 Constructor Declarations
- See Java Virtual Machine Specification:
- 
4.7.9.1 Signatures
- Since:
- 24
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionReturns the signatures of the parameters of this method or constructor, may be empty.static MethodSignatureReturns a method signature with no type parameter or exception type.static MethodSignatureof(MethodTypeDesc methodDescriptor) Returns a method signature for a raw method descriptor.static MethodSignatureof(List<Signature.TypeParam> typeParameters, List<Signature.ThrowableSig> exceptions, Signature result, Signature... arguments) Returns a method signature.static MethodSignatureParses a raw method signature string into aMethodSignature.result()Returns the signatures of the return value of this method.Returns the raw signature string.Returns the signatures of the exceptions thrown by this method or constructor.Returns the type parameters of this method or constructor, may be empty.
- 
Method Details- 
typeParametersList<Signature.TypeParam> typeParameters()Returns the type parameters of this method or constructor, may be empty.- Returns:
- the type parameters of this method or constructor, may be empty
- See Java Language Specification:
- 
8.4.4 Generic Methods
 8.8.4 Generic Constructors
- See Also:
 
- 
argumentsReturns the signatures of the parameters of this method or constructor, may be empty. The parameters may differ from those in the method descriptor because some synthetic or implicit parameters are omitted.- Returns:
- the signatures of the parameters of this method or constructor, may be empty
- See Java Language Specification:
- 
8.4.1 Formal Parameters
 8.8.1 Formal Parameters
- See Also:
 
- 
resultSignature result()Returns the signatures of the return value of this method. For constructors, this returns a signature representingvoid.- Returns:
- the signatures of the return value of this method
- See Java Language Specification:
- 
8.4.5 Method Result
- See Also:
 
- 
throwableSignaturesList<Signature.ThrowableSig> throwableSignatures()Returns the signatures of the exceptions thrown by this method or constructor.- Returns:
- the signatures of the exceptions thrown by this method or constructor
- See Java Language Specification:
- 
8.4.6 Method Throws
 8.8.5 Constructor Throws
- See Also:
 
- 
signatureString
- 
ofReturns a method signature for a raw method descriptor. The resulting signature has no type parameter or exception type declared.- Parameters:
- methodDescriptor- the method descriptor
- Returns:
- a method signature for a raw method descriptor
 
- 
ofReturns a method signature with no type parameter or exception type. The parameters may differ from those in the method descriptor because some synthetic or implicit parameters are omitted.- Parameters:
- result- signature for the return type
- arguments- signatures for the method parameters
- Returns:
- a method signature with no type parameter or exception type
 
- 
ofstatic MethodSignature of(List<Signature.TypeParam> typeParameters, List<Signature.ThrowableSig> exceptions, Signature result, Signature... arguments) Returns a method signature. The parameters may differ from those in the method descriptor because some synthetic or implicit parameters are omitted.- Parameters:
- typeParameters- signatures for the type parameters
- exceptions- signatures for the exceptions
- result- signature for the return type
- arguments- signatures for the method parameters
- Returns:
- a method signature
 
- 
parseFromParses a raw method signature string into aMethodSignature.- Parameters:
- methodSignature- the raw method signature string
- Returns:
- the parsed method signature
- Throws:
- IllegalArgumentException- if the string is not a valid method signature string
 
 
-