Class MethodImplementationBuilder


  • public class MethodImplementationBuilder
    extends java.lang.Object
    • Constructor Detail

      • MethodImplementationBuilder

        public MethodImplementationBuilder​(int registerCount)
    • Method Detail

      • addLabel

        @Nonnull
        public Label addLabel​(@Nonnull
                              java.lang.String name)
        Adds a new named label at the current location. Any previous unplaced references to a label of this name will now refer to this label/location
        Parameters:
        name - The name of the label to add
        Returns:
        A LabelRef representing the label
      • getLabel

        @Nonnull
        public Label getLabel​(@Nonnull
                              java.lang.String name)
        Get a reference to a label with the given name. If a label with that name has not been added yet, a new one is created, but is left in an unplaced state. It is assumed that addLabel(name) will be called at a later point to define the location of the label.
        Parameters:
        name - The name of the label to get
        Returns:
        A LabelRef representing the label
      • addCatch

        public void addCatch​(@Nullable
                             java.lang.String type,
                             @Nonnull
                             Label from,
                             @Nonnull
                             Label to,
                             @Nonnull
                             Label handler)
      • addCatch

        public void addCatch​(@Nonnull
                             Label from,
                             @Nonnull
                             Label to,
                             @Nonnull
                             Label handler)
      • addLineNumber

        public void addLineNumber​(int lineNumber)
      • addEndLocal

        public void addEndLocal​(int registerNumber)
      • addRestartLocal

        public void addRestartLocal​(int registerNumber)
      • addPrologue

        public void addPrologue()
      • addEpilogue

        public void addEpilogue()
      • addSetSourceFile

        public void addSetSourceFile​(@Nullable
                                     StringReference sourceFile)
      • addInstruction

        public void addInstruction​(@Nullable
                                   BuilderInstruction instruction)