Package org.codehaus.mojo.javacc
Class JJDoc
- java.lang.Object
-
- org.codehaus.mojo.javacc.ToolFacade
-
- org.codehaus.mojo.javacc.JJDoc
-
class JJDoc extends ToolFacade
Provides a facade for the mojos to invoke JJDoc.- See Also:
- JJDoc Reference
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classJJDoc.MojoLogStreamConsumerConsume and log command line output from the JJDoc process.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.BooleanbnfThe option BNF.private java.lang.StringcssHrefThe option CSS.private java.lang.StringgrammarEncodingThe option GRAMMAR_ENCODING.private java.io.FileinputFileThe input grammar.private java.lang.BooleanoneTableThe option ONE_TABLE.private java.io.FileoutputFileThe option OUTPUT_FILE.private java.lang.BooleantextThe option TEXT.
-
Constructor Summary
Constructors Constructor Description JJDoc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intexecute()Runs the tool using the previously set parameters.private java.lang.String[]generateArguments()Assembles the command line arguments for the invocation of JJDoc according to the configuration.voidsetBnf(java.lang.Boolean value)Sets the option BNF.voidsetCssHref(java.lang.String value)Sets the option CSS, i.e the hypertext reference to a CSS file for the generated HTML output.voidsetGrammarEncoding(java.lang.String value)Sets the option GRAMMAR_ENCODING.voidsetInputFile(java.io.File value)Sets the absolute path to the grammar file to pass into JJDoc for documentation.voidsetOneTable(java.lang.Boolean value)Sets the option value ONE_TABLE.voidsetOutputFile(java.io.File value)Sets the absolute path to the output file.voidsetText(java.lang.Boolean value)Sets the option TEXT.java.lang.StringtoString()Gets a string representation of the command line arguments.-
Methods inherited from class org.codehaus.mojo.javacc.ToolFacade
getLog, getToolName, run, setLog
-
-
-
-
Field Detail
-
inputFile
private java.io.File inputFile
The input grammar.
-
outputFile
private java.io.File outputFile
The option OUTPUT_FILE.
-
grammarEncoding
private java.lang.String grammarEncoding
The option GRAMMAR_ENCODING.
-
cssHref
private java.lang.String cssHref
The option CSS.
-
text
private java.lang.Boolean text
The option TEXT.
-
bnf
private java.lang.Boolean bnf
The option BNF.
-
oneTable
private java.lang.Boolean oneTable
The option ONE_TABLE.
-
-
Method Detail
-
setInputFile
public void setInputFile(java.io.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(java.io.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(java.lang.String value)
Sets the option GRAMMAR_ENCODING.- Parameters:
value- The option value, may benullto use the value provided in the grammar or the default.
-
setCssHref
public void setCssHref(java.lang.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 benullto use the default style.
-
setText
public void setText(java.lang.Boolean value)
Sets the option TEXT.- Parameters:
value- The option value, may benullto use the default value.
-
setBnf
public void setBnf(java.lang.Boolean value)
Sets the option BNF.- Parameters:
value- The option value, may benullto use the default value.
-
setOneTable
public void setOneTable(java.lang.Boolean value)
Sets the option value ONE_TABLE.- Parameters:
value- The option value, may benullto use the default value.
-
execute
protected int execute() throws java.lang.ExceptionRuns the tool using the previously set parameters.- Specified by:
executein classToolFacade- Returns:
- The exit code of the tool, non-zero means failure.
- Throws:
java.lang.Exception- If the tool could not be invoked.
-
generateArguments
private java.lang.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 java.lang.String toString()
Gets a string representation of the command line arguments.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the command line arguments.
-
-