Class DirectivesMethod

java.lang.Object
org.eolang.jeo.representation.directives.DirectivesMethod
All Implemented Interfaces:
Iterable<org.xembly.Directive>

public final class DirectivesMethod extends Object implements Iterable<org.xembly.Directive>
Directives Method.
Since:
0.1
  • Constructor Details

    • DirectivesMethod

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

      public DirectivesMethod(String name, DirectivesMethodProperties properties)
      Constructor.
      Parameters:
      name - Method name
      properties - Method properties
    • DirectivesMethod

      public DirectivesMethod(String name, boolean counting, DirectivesMethodProperties properties)
      Constructor.
      Parameters:
      name - Method name
      counting - Opcodes counting
      properties - Method properties
    • DirectivesMethod

      public DirectivesMethod(Signature name, DirectivesMethodProperties properties, List<Iterable<org.xembly.Directive>> instructions, List<Iterable<org.xembly.Directive>> exceptions, DirectivesAnnotations annotations, List<Iterable<org.xembly.Directive>> dvalue, boolean counting)
      Constructor.
      Parameters:
      name - Method name
      properties - Method properties
      instructions - Method instructions
      exceptions - Method exceptions
      annotations - Method annotations
      dvalue - Annotation default value
      counting - Opcodes counting
  • Method Details

    • withOpcode

      public DirectivesMethod withOpcode(int opcode, Object... operands)
      Add opcode to the directives.
      Parameters:
      opcode - Opcode
      operands - Operands
      Returns:
      This object
    • withAnnotation

      public DirectivesMethod withAnnotation(DirectivesAnnotation annotation)
      Add annotation to the directives.
      Parameters:
      annotation - Annotation directives.
      Returns:
      This object.
    • iterator

      public Iterator<org.xembly.Directive> iterator()
      Specified by:
      iterator in interface Iterable<org.xembly.Directive>