|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--de.hunsicker.jalopy.plugin.ant.AntPlugin
The Jalopy Ant Plug-in. Formats Java source files according to some user configurable rules. For more information about the Jalopy Java Source Code Formatter visit the official homepage: http://jalopy.sf.net/
Field Summary |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
AntPlugin()
Creates a new AntPlugin object. |
Method Summary | |
void |
addFileset(org.apache.tools.ant.types.FileSet set)
Adds a set of files (nested fileset attribute). |
void |
execute()
Executes the task. |
void |
init()
Initializes the task. |
void |
setBackup(boolean backup)
Sets whether a backup of an original file should be kept. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference reference)
Set the reference to the project classpath. |
void |
setConvention(java.lang.String location)
Sets the location of the code convention to use. |
void |
setDestdir(java.io.File destDir)
Sets the destination directory into which the Java source files should be formatted. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding to use. |
void |
setFailOnError(boolean fail)
Sets whether an error will immediately cancel the run. |
void |
setFile(java.io.File file)
Sets a single source file to format. |
void |
setFileFormat(java.lang.String fileFormat)
Sets the file format to use. |
void |
setForce(boolean force)
Controls whether all files should always be formatted. |
void |
setFork(boolean fork)
Sets the fork attribute. |
void |
setHistory(java.lang.String policy)
Sets the history policy to use. |
void |
setHistoryMethod(java.lang.String method)
Sets the history method to use. |
void |
setJavadoc(boolean javadoc)
Sets whether Javadoc related messages should be displayed. |
void |
setLoglevel(java.lang.String level)
Sets the level to control logging output. |
void |
setStyle(java.lang.String location)
Deprecated. |
void |
setThreads(java.lang.String threads)
Sets the number of processing threads to use. |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AntPlugin()
Method Detail |
public void setBackup(boolean backup)
backup
- if true
a backup of an original file will be kept.public void setClasspathRef(org.apache.tools.ant.types.Reference reference)
reference
- project classpath reference.public void setConvention(java.lang.String location)
location
- absolute or relative path to load style convention from.public void setDestdir(java.io.File destDir)
destDir
- destination directory.Jalopy.setDestination(java.io.File)
public void setEncoding(java.lang.String encoding)
encoding
- encoding to use.Jalopy.setEncoding(java.lang.String)
public void setFailOnError(boolean fail)
fail
- if true
an error will lead to an immediate cancelation of
the run.public void setFile(java.io.File file)
file
- the file to format.
java.lang.IllegalArgumentException
- if the file does not exist.Jalopy.setInput(File)
public void setFileFormat(java.lang.String fileFormat)
fileFormat
- format to use.
java.lang.IllegalArgumentException
- if an invalid file format was givenJalopy.setFileFormat(String)
public void setForce(boolean force)
force
- if true
all files are always formatted.Jalopy.setForce(boolean)
public void setFork(boolean fork)
fork
- if true
the task will be executed in a new process.public void setHistory(java.lang.String policy)
policy
- Either COMMENT
orFILE
orNONE
java.lang.IllegalArgumentException
- if an invalid history policy is specified.public void setHistoryMethod(java.lang.String method)
method
- Eithertimestamp
orcrc32
oradler32
java.lang.IllegalArgumentException
- if an invalid history method is specified.public void setJavadoc(boolean javadoc)
Note that setting this switch to false
means that no
Javadoc related messages will be displayed no matter what ever happens! Even if
formatting failed due to Javadoc parsing errors, there will be no output
indicating this fact.
javadoc
- if true
Javadoc messages will be displayed.public void setLoglevel(java.lang.String level)
ERROR
the highest level and DEBUG
the lowest
level.
Enabling logging at a given level also enables logging at all higher levels.
level
- the logging level to use.
java.lang.IllegalArgumentException
- if an invalid logging level has been specified.public void setStyle(java.lang.String location)
location
- absolute or relative path to load style convention from.public void setThreads(java.lang.String threads)
threads
- the thread count to use. A number between 1 and 8.
java.lang.IllegalArgumentException
- if threads < 1
or threads
> 8
public void addFileset(org.apache.tools.ant.types.FileSet set)
set
- fileset to add.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if someting goes wrong with the build.public void init() throws org.apache.tools.ant.BuildException
init
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if the initialization failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |