public class JavaCCMojo extends AbstractJavaCCMojo
*.jj
) and transforms it to Java source files. Detailed information
about the JavaCC options can be found on the JavaCC website.Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
excludes
A set of Ant-like exclusion patterns used to prevent certain files from being processed.
|
private java.lang.String[] |
includes
A set of Ant-like inclusion patterns used to select files from the source directory for processing.
|
private java.io.File |
outputDirectory
The directory where the parser files generated by JavaCC will be stored.
|
private java.lang.String |
packageName
Deprecated.
As of version 2.4 because the plugin extracts the package name from each grammar file.
|
private java.io.File |
sourceDirectory
The directory where the JavaCC grammar files (
*.jj ) are located. |
private int |
staleMillis
The granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
|
Constructor and Description |
---|
JavaCCMojo() |
Modifier and Type | Method and Description |
---|---|
protected java.io.File[] |
getCompileSourceRoots()
Gets all the output directories to register with the project for compilation.
|
protected java.lang.String[] |
getExcludes()
Gets a set of Ant-like exclusion patterns used to unselect files from the source directory for processing.
|
protected java.lang.String[] |
getIncludes()
Gets a set of Ant-like inclusion patterns used to select files from the source directory for processing.
|
protected java.io.File |
getOutputDirectory()
Gets the absolute path to the directory where the generated Java files for the parser will be stored.
|
protected java.lang.String |
getParserPackage()
Gets the package into which the generated parser files should be stored.
|
protected java.io.File |
getSourceDirectory()
Gets the absolute path to the directory where the grammar files are located.
|
protected int |
getStaleMillis()
Gets the granularity in milliseconds of the last modification date for testing whether a source needs
recompilation.
|
protected void |
processGrammar(GrammarInfo grammarInfo)
Passes the specified grammar file through the tool.
|
copyGrammarOutput, deleteTempDirectory, execute, getGrammarEncoding, getIsStatic, getJdkVersion, getTempDirectory, isSourceRoot, newJavaCC
private java.lang.String packageName
private java.io.File sourceDirectory
*.jj
) are located.private java.io.File outputDirectory
private int staleMillis
private java.lang.String[] includes
**/*.jj
and **/*.JJ
are used to select grammar files.private java.lang.String[] excludes
protected java.io.File getSourceDirectory()
getSourceDirectory
in class AbstractJavaCCMojo
null
.protected java.lang.String[] getIncludes()
getIncludes
in class AbstractJavaCCMojo
null
if all files should be included.protected java.lang.String[] getExcludes()
getExcludes
in class AbstractJavaCCMojo
null
if no files should be excluded.protected java.io.File getOutputDirectory()
getOutputDirectory
in class AbstractJavaCCMojo
null
.protected int getStaleMillis()
getStaleMillis
in class AbstractJavaCCMojo
protected java.io.File[] getCompileSourceRoots()
getCompileSourceRoots
in class AbstractJavaCCMojo
null
.protected java.lang.String getParserPackage()
getParserPackage
in class AbstractJavaCCMojo
null
to use the
package declaration from the grammar file.protected void processGrammar(GrammarInfo grammarInfo) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
processGrammar
in class AbstractJavaCCMojo
grammarInfo
- The grammar info describing the grammar file to process, must not be null
.org.apache.maven.plugin.MojoExecutionException
- If the invocation of the tool failed.org.apache.maven.plugin.MojoFailureException
- If the tool reported a non-zero exit code.