Class SequenceDiagramWriter

  • Direct Known Subclasses:
    UmlGraphWriter

    public class SequenceDiagramWriter
    extends java.lang.Object
    The Class SequenceDiagramWriter uses the format of websequence diagram to generate the chart. You can find this format at www.websequencediagrams.com.
    Since:
    1.6 (14.06.2015)
    Version:
    $Revision: 1.14 $
    Author:
    oliver
    • Constructor Detail

      • SequenceDiagramWriter

        public SequenceDiagramWriter​(java.io.File file)
        Instantiates a new sequence diagram writer.
        Parameters:
        file - the file
      • SequenceDiagramWriter

        public SequenceDiagramWriter​(java.io.OutputStream ostream)
        Instantiates a new sequence diagram writer.
        Parameters:
        ostream - the ostream
      • SequenceDiagramWriter

        public SequenceDiagramWriter​(java.io.Writer writer)
        Instantiates a new sequence diagram writer.
        Parameters:
        writer - the writer
      • SequenceDiagramWriter

        public SequenceDiagramWriter​(java.io.Writer writer,
                                     java.util.List<DrawStatement> statements)
        Instantiates a new sequence diagram writer.
        Parameters:
        writer - the writer
        statements - the statements
    • Method Detail

      • getWriter

        protected java.io.Writer getWriter()
        Gets the writer.
        Returns:
        the writer
      • getStatements

        protected java.util.List<DrawStatement> getStatements()
        Gets the statements.
        Returns:
        the statements
      • addStatements

        public void addStatements​(java.util.Collection<DrawStatement> drawStatements)
        Adds the statements.
        Parameters:
        drawStatements - the statements
      • addStatement

        public void addStatement​(DrawStatement stmt)
        Adds a statement.
        Parameters:
        stmt - the statement.
      • writeSequenceDiagram

        public void writeSequenceDiagram()
        Write sequence diagram.
      • writeCreateMessage

        protected void writeCreateMessage​(DrawStatement stmt)
        Write create message.
        Parameters:
        stmt - the stmt
      • writeMessage

        protected void writeMessage​(DrawStatement stmt)
        Write message.
        Parameters:
        stmt - the stmt
      • writeReturnMessage

        protected void writeReturnMessage​(DrawStatement stmt)
        Write return message.
        Parameters:
        stmt - the stmt
      • writeHeaderFor

        public final void writeHeaderFor​(java.io.File file)
        This method can be used to write the title of the diagram. The title will be derived from the file name.
        Parameters:
        file - the file
      • writeLine

        protected final void writeLine​(java.lang.String line)
        Write line.
        Parameters:
        line - the line
      • close

        public void close()
        Close quietly.