Interface MethodSignature
public sealed interface MethodSignature
Models the generic signature of a method, as defined by JVMS 4.7.9.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionReturns the signatures of the parameters of this method.static MethodSignature
Returns a method signature.static MethodSignature
of
(MethodTypeDesc methodDescriptor) Returns a method signature for a raw (no generic information) method descriptor.static MethodSignature
of
(List<Signature.TypeParam> typeParameters, List<Signature.ThrowableSig> exceptions, Signature result, Signature... arguments) Returns a method signature.static MethodSignature
Parses a raw method signature string into a MethodSignatureresult()
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.Returns the type parameters of this method.
-
Method Details
-
typeParameters
List<Signature.TypeParam> typeParameters()Returns the type parameters of this method.- Returns:
- the type parameters of this method
-
arguments
-
result
Signature result()Returns the signatures of the return value of this method.- Returns:
- the signatures of the return value of this method
-
throwableSignatures
List<Signature.ThrowableSig> throwableSignatures()Returns the signatures of the exceptions thrown by this method.- Returns:
- the signatures of the exceptions thrown by this method
-
signatureString
-
of
Returns a method signature for a raw (no generic information) method descriptor.- Parameters:
methodDescriptor
- the method descriptor- Returns:
- a method signature for a raw (no generic information) method descriptor
-
of
Returns a method signature.- Parameters:
result
- signature for the return typearguments
- signatures for the method arguments- Returns:
- a method signature
-
of
static MethodSignature of(List<Signature.TypeParam> typeParameters, List<Signature.ThrowableSig> exceptions, Signature result, Signature... arguments) Returns a method signature.- Parameters:
typeParameters
- signatures for the type parametersexceptions
- signatures for the exceptionsresult
- signature for the return typearguments
- signatures for the method arguments- Returns:
- a method signature
-
parseFrom
Parses a raw method signature string into a MethodSignature- Parameters:
methodSignature
- the raw method signature string- Returns:
- method signature
-