Interface MethodModel

All Superinterfaces:
AttributedElement, ClassElement, ClassFileElement, CompoundElement<MethodElement>, Iterable<MethodElement>

public sealed interface MethodModel extends CompoundElement<MethodElement>, AttributedElement, ClassElement
Models a method. The contents of the method can be traversed via a streaming view, or via random access (e.g., flags()), or by freely mixing the two.
Since:
24
  • Method Details

    • flags

      AccessFlags flags()
      Returns the access flags.
      Returns:
      the access flags
    • parent

      Optional<ClassModel> parent()
      Returns the class model this method is a member of, if known.
      Returns:
      the class model this method is a member of, if known
    • methodName

      Utf8Entry methodName()
      Returns the name of this method.
      Returns:
      the name of this method
    • methodType

      Utf8Entry methodType()
      Returns the method descriptor of this method.
      Returns:
      the method descriptor of this method
    • methodTypeSymbol

      default MethodTypeDesc methodTypeSymbol()
      Returns the method descriptor of this method, as a symbolic descriptor.
      Returns:
      the method descriptor of this method, as a symbolic descriptor
    • code

      Returns the body of this method, if there is one.
      Returns:
      the body of this method, if there is one