org.codehaus.mojo.antlr
Class AbstractAntlrMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.antlr.AbstractAntlrMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AntlrHtmlReport, AntlrPlugin

public abstract class AbstractAntlrMojo
extends org.apache.maven.plugin.AbstractMojo

Base class with majority of Antlr functionalities.

Version:
$Id: AbstractAntlrMojo.java 6341 2008-02-25 08:31:17Z dholroyd $
Author:
Vincent Siveton

Nested Class Summary
static class AbstractAntlrMojo.NoAntlrDependencyDefinedException
           
 
Field Summary
protected  Grammar[] grammarDefs
          Grammar list presents in the sourceDirectory directory.
protected  String grammars
          Comma separated grammar file names or grammar pattern file names present in the sourceDirectory directory.
protected  File outputDirectory
          Specifies the destination directory where Antlr should generate files.
protected  org.apache.maven.project.MavenProject project
          The Maven Project Object
protected  File sourceDirectory
          Specifies the Antlr directory containing grammar files.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractAntlrMojo()
           
 
Method Summary
protected static void addArgIf(List arguments, boolean b, String value)
          Convenience method to add an argument
protected abstract  void addArgs(List arguments)
          Add arguments to be included in Antlr call
protected  void executeAntlr()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

sourceDirectory

protected File sourceDirectory
Specifies the Antlr directory containing grammar files.


project

protected org.apache.maven.project.MavenProject project
The Maven Project Object


outputDirectory

protected File outputDirectory
Specifies the destination directory where Antlr should generate files.
See Command Line Options


grammars

protected String grammars
Comma separated grammar file names or grammar pattern file names present in the sourceDirectory directory.
See Command Line Options


grammarDefs

protected Grammar[] grammarDefs
Grammar list presents in the sourceDirectory directory.
See Command Line Options
Example:
 <grammarDefs>
<grammar>
<name>myGrammar.g</name>
<glib>mySuperGrammar.g;myOtherSuperGrammar.g</glib>
</grammar>
</grammarDefs>

Constructor Detail

AbstractAntlrMojo

public AbstractAntlrMojo()
Method Detail

executeAntlr

protected void executeAntlr()
                     throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

addArgs

protected abstract void addArgs(List arguments)
Add arguments to be included in Antlr call

Parameters:
arguments -

addArgIf

protected static void addArgIf(List arguments,
                               boolean b,
                               String value)
Convenience method to add an argument

Parameters:
arguments -
b -
value -


Copyright © 2004-2011 Codehaus. All Rights Reserved.