public sealed interface MethodSignature
| Modifier and Type | Method | Description |
|---|---|---|
List |
arguments() |
Returns the signatures of the parameters of this method or constructor, may be empty. |
static MethodSignature |
of |
Returns a method signature with no type parameter or exception type. |
static MethodSignature |
of |
Returns a method signature for a raw method descriptor. |
static MethodSignature |
of |
Returns a method signature. |
static MethodSignature |
parseFrom |
Parses a raw method signature string into a MethodSignature. |
Signature |
result() |
Returns the signatures of the return value of this method. |
String |
signatureString() |
Returns the raw signature string. |
List |
throwableSignatures() |
Returns the signatures of the exceptions thrown by this method or constructor. |
List |
typeParameters() |
Returns the type parameters of this method or constructor, may be empty. |
List<Signature.TypeParam> typeParameters()
List<Signature> arguments()
Signature result()
void.List<Signature.ThrowableSig> throwableSignatures()
String signatureString()
static MethodSignature of(MethodTypeDesc methodDescriptor)
methodDescriptor - the method descriptorstatic MethodSignature of(Signature result, Signature... arguments)
result - signature for the return typearguments - signatures for the method parametersstatic MethodSignature of(List<Signature.TypeParam> typeParameters, List<Signature.ThrowableSig> exceptions, Signature result, Signature... arguments)
typeParameters - signatures for the type parametersexceptions - signatures for the exceptionsresult - signature for the return typearguments - signatures for the method parametersstatic MethodSignature parseFrom(String methodSignature)
MethodSignature.methodSignature - the raw method signature stringIllegalArgumentException - if the string is not a valid method signature string
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/MethodSignature.html