Class BytecodeMethod


  • public final class BytecodeMethod
    extends Object
    Bytecode method.
    Since:
    0.1.0
    • Constructor Detail

      • BytecodeMethod

        public BytecodeMethod()
        Constructor for tests.
      • BytecodeMethod

        public BytecodeMethod​(String name)
        Constructor.
        Parameters:
        name - Method name.
      • BytecodeMethod

        public BytecodeMethod​(BytecodeEntry... instructions)
        Constructor.
        Parameters:
        instructions - Method instructions.
      • BytecodeMethod

        public BytecodeMethod​(String name,
                              BytecodeAnnotations annotations)
        Constructor.
        Parameters:
        name - Method name.
        annotations - Method annotations.
      • BytecodeMethod

        public BytecodeMethod​(String name,
                              BytecodeMaxs maxs)
        Constructor.
        Parameters:
        name - Method name.
        maxs - Max stack and locals.
      • BytecodeMethod

        public BytecodeMethod​(BytecodeMethodProperties properties,
                              BytecodeMaxs maxs)
        Constructor.
        Parameters:
        properties - Method properties.
        maxs - Max stack and locals.
        Suppressed Checkstyle violations:
        ParameterNumberCheck (10 lines)
    • Method Detail

      • withoutMaxs

        public BytecodeMethod withoutMaxs()
        Similar method without maxs.
        Returns:
        Method without maxs.
      • label

        public BytecodeMethod label​(String label)
        Add label.
        Parameters:
        label - Label.
        Returns:
        This object.
      • trycatch

        public BytecodeMethod trycatch​(BytecodeEntry entry)
        Add try-catch block.
        Parameters:
        entry - Try-catch block.
        Returns:
        This object.
      • entry

        public BytecodeMethod entry​(BytecodeEntry entry)
        Add some bytecode entry.
        Parameters:
        entry - Entry.
        Returns:
        This object.
      • name

        public String name()
        Method name.
        Returns:
        Method name.
      • directives

        public DirectivesMethod directives()
        Generate directives.
        Returns:
        Directives.
      • intructions

        public List<BytecodeEntry> intructions()
        Method instructions.
        Returns:
        Instructions.