Package org.codehaus.mojo.javacc
Class ToolFacade
java.lang.Object
org.codehaus.mojo.javacc.ToolFacade
Provides a facade for the mojos to invoke JavaCC related tools.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.plugin.logging.LogThe logger used to output diagnostic messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intexecute()Runs the tool using the previously set parameters.protected org.apache.maven.plugin.logging.LoggetLog()Gets the logger used to output diagnostic messages.protected StringGets the name of the tool.voidrun()Runs the tool using the previously set parameters.voidsetLog(org.apache.maven.plugin.logging.Log logger) Sets the logger used to output diagnostic messages.
-
Field Details
-
log
private org.apache.maven.plugin.logging.Log logThe logger used to output diagnostic messages.
-
-
Constructor Details
-
ToolFacade
ToolFacade()
-
-
Method Details
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log logger) Sets the logger used to output diagnostic messages.- Parameters:
logger- The logger used to output diagnostic messages, may benull.
-
getLog
protected org.apache.maven.plugin.logging.Log getLog()Gets the logger used to output diagnostic messages.- Returns:
- The logger used to output diagnostic messages, never
null.
-
getToolName
Gets the name of the tool.- Returns:
- The name of the tool, never
null.
-
run
public void run() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionRuns the tool using the previously set parameters.- Throws:
org.apache.maven.plugin.MojoExecutionException- If the tool could not be invoked.org.apache.maven.plugin.MojoFailureException- If the tool reported a non-zero exit code.
-
execute
Runs the tool using the previously set parameters.- Returns:
- The exit code of the tool, non-zero means failure.
- Throws:
Exception- If the tool could not be invoked.
-