Class ToolFacade

java.lang.Object
org.codehaus.mojo.javacc.ToolFacade
Direct Known Subclasses:
JavaCC, JJDoc, JJTree, JTB

abstract class ToolFacade extends Object
Provides a facade for the mojos to invoke JavaCC related tools.
Version:
$Id$
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.maven.plugin.logging.Log
    The logger used to output diagnostic messages.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract int
    Runs the tool using the previously set parameters.
    protected org.apache.maven.plugin.logging.Log
    Gets the logger used to output diagnostic messages.
    protected String
    Gets the name of the tool.
    void
    run()
    Runs the tool using the previously set parameters.
    void
    setLog(org.apache.maven.plugin.logging.Log logger)
    Sets the logger used to output diagnostic messages.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      private org.apache.maven.plugin.logging.Log log
      The 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 be null.
    • 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

      protected String 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.MojoFailureException
      Runs 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

      protected abstract int execute() throws Exception
      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.