Interface CodeModel

All Superinterfaces:
AttributedElement, ClassFileElement, CompoundElement<CodeElement>, Iterable<CodeElement>, MethodElement
All Known Subinterfaces:
CodeAttribute

public sealed interface CodeModel extends CompoundElement<CodeElement>, AttributedElement, MethodElement permits CodeAttribute (not exhaustive)
Models the body of a method (the Code attribute). The instructions of the method body are accessed via a streaming view.
Since:
24
  • Method Details

    • parent

      Returns the enclosing method, if known.
      Returns:
      the enclosing method, if known
    • exceptionHandlers

      List<ExceptionCatch> exceptionHandlers()
      Returns the exception table of the method. The exception table is also modeled by ExceptionCatch elements in the streaming view.
      Returns:
      the exception table of the method