Class GeneratorAsciiDoc<O,S extends Enum<S>,E extends Enum<E>>

java.lang.Object
net.tangly.fsm.utilities.Generator<O,S,E>
net.tangly.fsm.utilities.GeneratorAsciiDoc<O,S,E>
Type Parameters:
O - the class of the instance owning the finite state machine instance
S - enumeration type for the identifiers of states
E - enumeration type for the identifiers of events

public class GeneratorAsciiDoc<O,S extends Enum<S>,E extends Enum<E>> extends Generator<O,S,E>
Generates an AsciiDoc description of the finite state machine declaration. A state has a name, a context, description, final flag, initial flag, composite flag, entry action, and exit action. A transition has a start state name, end state name, description, local flag, guard, action,
  • Constructor Details

    • GeneratorAsciiDoc

      public GeneratorAsciiDoc(@NotNull @NotNull FsmBuilder<O,S,E> builder, String name)
      Constructor of the class.
      Parameters:
      builder - the finite state machine builder containing the machine to draw
      name - name of the finite state machine description
      See Also:
  • Method Details

    • generate

      public void generate(@NotNull @NotNull PrintWriter writer)
      Description copied from class: Generator
      Implement the creation of the text content for a specific generator.
      Specified by:
      generate in class Generator<O,S extends Enum<S>,E extends Enum<E>>
      Parameters:
      writer - writer to which the content shall be written
    • extension

      public String extension()
      Description copied from class: Generator
      Return the extension used by the generator when writing its output.
      Specified by:
      extension in class Generator<O,S extends Enum<S>,E extends Enum<E>>
      Returns:
      extension used by the generator