Class NonterminalCodeBuilder

java.lang.Object
org.glavo.classfile.impl.NonterminalCodeBuilder
All Implemented Interfaces:
Consumer<CodeElement>, ClassFileBuilder<CodeElement,CodeBuilder>, CodeBuilder
Direct Known Subclasses:
BlockCodeBuilderImpl, ChainedCodeBuilder

public abstract sealed class NonterminalCodeBuilder extends Object implements CodeBuilder permits ChainedCodeBuilder, BlockCodeBuilderImpl
  • Field Details

  • Constructor Details

    • NonterminalCodeBuilder

      public NonterminalCodeBuilder(CodeBuilder parent)
  • Method Details

    • receiverSlot

      public int receiverSlot()
      Description copied from interface: CodeBuilder
      Returns the local variable slot associated with the receiver..
      Specified by:
      receiverSlot in interface CodeBuilder
      Returns:
      the local variable slot associated with the receiver
    • parameterSlot

      public int parameterSlot(int paramNo)
      Description copied from interface: CodeBuilder
      Returns the local variable slot associated with the specified parameter.. The returned value is adjusted for the receiver slot (if the method is an instance method) and for the requirement that long and double values require two slots.
      Specified by:
      parameterSlot in interface CodeBuilder
      Parameters:
      paramNo - the index of the parameter
      Returns:
      the local variable slot associated with the specified parameter
    • constantPool

      public ConstantPoolBuilder constantPool()
      Description copied from interface: ClassFileBuilder
      Returns the constant pool builder associated with this builder.
      Specified by:
      constantPool in interface ClassFileBuilder<CodeElement,CodeBuilder>
      Returns:
      the constant pool builder associated with this builder
    • original

      public Optional<CodeModel> original()
      Description copied from interface: CodeBuilder
      Returns the CodeModel representing the method body being transformed, if this code builder represents the transformation of some CodeModel.
      Specified by:
      original in interface CodeBuilder
      Returns:
      the CodeModel representing the method body being transformed, if this code builder represents the transformation of some CodeModel
    • newLabel

      public Label newLabel()
      Description copied from interface: CodeBuilder
      Returns a fresh unbound label.
      Specified by:
      newLabel in interface CodeBuilder
      Returns:
      a fresh unbound label