Interface CodeModel

All Superinterfaces:
AttributedElement, ClassFileElement, CompoundElement<CodeElement>, Iterable<CodeElement>, MethodElement
All Known Subinterfaces:
CodeAttribute
All Known Implementing Classes:
BoundAttribute.BoundCodeAttribute, BufferedCodeBuilder.Model, CodeImpl

Models the body of a method (the Code attribute). The instructions of the method body are accessed via a streaming view (e.g., CompoundElement.elements()).
Since:
22
  • Method Details

    • maxLocals

      int maxLocals()
      Returns the maximum size of the local variable table.
      Returns:
      the maximum size of the local variable table
    • maxStack

      int maxStack()
      Returns the maximum size of the operand stack.
      Returns:
      the maximum size of the operand stack
    • 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