Class JJDoc


class JJDoc extends ToolFacade
Provides a facade for the mojos to invoke JJDoc.
Version:
$Id: JJDoc.java 10603 2009-09-06 15:05:08Z bentmann $
See Also:
  • Field Details

    • inputFile

      private File inputFile
      The input grammar.
    • outputFile

      private File outputFile
      The option OUTPUT_FILE.
    • grammarEncoding

      private String grammarEncoding
      The option GRAMMAR_ENCODING.
    • cssHref

      private String cssHref
      The option CSS.
    • text

      private Boolean text
      The option TEXT.
    • bnf

      private Boolean bnf
      The option BNF.
    • oneTable

      private Boolean oneTable
      The option ONE_TABLE.
  • Constructor Details

    • JJDoc

      JJDoc()
  • Method Details

    • setInputFile

      public void setInputFile(File value)
      Sets the absolute path to the grammar file to pass into JJDoc for documentation.
      Parameters:
      value - The absolute path to the grammar file to pass into JJDoc for documentation.
    • setOutputFile

      public void setOutputFile(File value)
      Sets the absolute path to the output file.
      Parameters:
      value - The absolute path to the HTML/text file to generate.
    • setGrammarEncoding

      public void setGrammarEncoding(String value)
      Sets the option GRAMMAR_ENCODING.
      Parameters:
      value - The option value, may be null to use the value provided in the grammar or the default.
    • setCssHref

      public void setCssHref(String value)
      Sets the option CSS, i.e the hypertext reference to a CSS file for the generated HTML output.
      Parameters:
      value - The option value, may be null to use the default style.
    • setText

      public void setText(Boolean value)
      Sets the option TEXT.
      Parameters:
      value - The option value, may be null to use the default value.
    • setBnf

      public void setBnf(Boolean value)
      Sets the option BNF.
      Parameters:
      value - The option value, may be null to use the default value.
    • setOneTable

      public void setOneTable(Boolean value)
      Sets the option value ONE_TABLE.
      Parameters:
      value - The option value, may be null to use the default value.
    • execute

      protected int execute() throws Exception
      Runs the tool using the previously set parameters.
      Specified by:
      execute in class ToolFacade
      Returns:
      The exit code of the tool, non-zero means failure.
      Throws:
      Exception - If the tool could not be invoked.
    • generateArguments

      private String[] generateArguments()
      Assembles the command line arguments for the invocation of JJDoc according to the configuration.
      Returns:
      A string array that represents the arguments to use for JJDoc.
    • toString

      public String toString()
      Gets a string representation of the command line arguments.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the command line arguments.