Class CompactFlowProducer

    • Field Detail

      • COMMENT

        public static final String COMMENT
        the line comment character in files storing nested option handlers.
        See Also:
        Constant Field Values
      • m_OutputProlog

        protected boolean m_OutputProlog
        whether to suppress the prolog.
      • m_OutputClasspath

        protected boolean m_OutputClasspath
        whether to print the classpath.
      • m_OutputLineNumbers

        protected boolean m_OutputLineNumbers
        whether to print line numbers.
      • m_Encoding

        protected BaseCharset m_Encoding
        the encoding to use.
      • m_DateFormat

        protected static DateFormat m_DateFormat
        for formatting dates.
      • m_StripProducer

        protected NestedProducer m_StripProducer
        for stripping down an actor.
      • m_StripConsumer

        protected NestedConsumer m_StripConsumer
        for stripping down an actor.
    • Constructor Detail

      • CompactFlowProducer

        public CompactFlowProducer()
    • Method Detail

      • getDateFormat

        protected DateFormat getDateFormat()
        Returns the formatter for the timestamps.
        Returns:
        the formatter
      • setOutputProlog

        public void setOutputProlog​(boolean value)
        Sets whether to output the prolog (in comments) or not.
        Parameters:
        value - if true then the prolog is generated
      • getOutputProlog

        public boolean getOutputProlog()
        Returns whether the prolog (comments) is generated.
        Returns:
        true if the prolog is generated
      • outputPrologTipText

        public String outputPrologTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOutputClasspath

        public void setOutputClasspath​(boolean value)
        Sets whether to output the classpath (in comments) or not.
        Parameters:
        value - if true then the classpath is generated
      • getOutputClasspath

        public boolean getOutputClasspath()
        Returns whether the classpath (comments) is generated.
        Returns:
        true if the classpath is generated
      • outputClasspathTipText

        public String outputClasspathTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOutputLineNumbers

        public void setOutputLineNumbers​(boolean value)
        Sets whether to output the line numbers.
        Parameters:
        value - if true then the lines get prefixed with line numbers
      • getOutputLineNumbers

        public boolean getOutputLineNumbers()
        Returns whether line numbers get output.
        Returns:
        true if lines get prefixed with line numbers
      • outputLineNumbersTipText

        public String outputLineNumbersTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setEncoding

        public void setEncoding​(BaseCharset value)
        Sets the encoding to use.
        Specified by:
        setEncoding in interface EncodingSupporter
        Parameters:
        value - the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • getEncoding

        public BaseCharset getEncoding()
        Returns the encoding to use.
        Specified by:
        getEncoding in interface EncodingSupporter
        Returns:
        the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • encodingTipText

        public String encodingTipText()
        Returns the tip text for this property.
        Specified by:
        encodingTipText in interface EncodingSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • strip

        public Actor strip​(Actor actor)
        Returns a stripped down version of the actor, i.e., for ActorHandlers, a copy of the actor without any sub-actors gets returned.
        Parameters:
        actor - the actor to strip down
        Returns:
        the stripped down actor
        See Also:
        ActorHandler
      • process

        protected void process​(Actor actor)
        Processes the actor.
        Parameters:
        actor - the actor to process
      • toString

        protected int toString​(StringBuilder buffer,
                               List current,
                               int depth,
                               int lineNo)
        For generating a string from the nested structure.
        Parameters:
        buffer - the buffer to add to
        current - the current list to process
        depth - the nesting depth (used for indentation)
        lineNo - the line number (1-based)
        Returns:
        the updated line number
      • toString

        public String toString​(List nested)
        Returns the output generated from the visit.
        Parameters:
        nested - the nested format
        Returns:
        the output, null in case of an error
      • main

        public static void main​(String[] args)
        Executes the producer from commandline.
        Parameters:
        args - the commandline arguments, use -help for help