Interface MethodSignature


public sealed interface MethodSignature
Models the generic signature of a method, as defined by JVMS 4.7.9.
Since:
24
  • Method Details

    • typeParameters

      List<Signature.TypeParam> typeParameters()
      Returns the type parameters of this method.
      Returns:
      the type parameters of this method
    • arguments

      List<Signature> arguments()
      Returns the signatures of the parameters of this method.
      Returns:
      the signatures of the parameters of this method
    • 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

      String signatureString()
      Returns the raw signature string.
      Returns:
      the raw signature string
    • of

      static MethodSignature of(MethodTypeDesc methodDescriptor)
      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

      static MethodSignature of(Signature result, Signature... arguments)
      Returns a method signature.
      Parameters:
      result - signature for the return type
      arguments - 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 parameters
      exceptions - signatures for the exceptions
      result - signature for the return type
      arguments - signatures for the method arguments
      Returns:
      a method signature
    • parseFrom

      static MethodSignature parseFrom(String methodSignature)
      Parses a raw method signature string into a MethodSignature
      Parameters:
      methodSignature - the raw method signature string
      Returns:
      method signature