|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.carrot2.ant.tasks.AbstractLicenseTask
public abstract class AbstractLicenseTask
A base ANT task for adding, replacing or listing licensing info in class headers or footers.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
|---|
fileset |
| 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 | |
|---|---|
AbstractLicenseTask()
|
|
| Method Summary | |
|---|---|
protected abstract void |
checkLicense(File file)
Invoked for each file where licensing should be checked. |
protected void |
checkParameters()
Checks if all parameters are correct. |
FileSet |
createFileset()
Crates a new path with a set of dependency files to scan. |
void |
execute()
Executes the task. |
protected String |
getEncoding()
Returns current source file encoding or null if none yet. |
protected String |
readFile(File file)
Reads a single file into memory. |
void |
setEncoding(String encoding)
Set source file encoding. |
void |
setForce(boolean force)
Set to true to make the task accept files not ending with
the default Java source file suffix. |
protected void |
writeFile(String string,
File file)
Write a string to file. |
| Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
|---|
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getProject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractLicenseTask()
| Method Detail |
|---|
public FileSet createFileset()
protected void checkParameters()
throws BuildException
BuildException
public void execute()
throws BuildException
execute in class TaskBuildException
protected abstract void checkLicense(File file)
throws IOException,
BuildException
IOException
BuildExceptionpublic void setEncoding(String encoding)
public void setForce(boolean force)
true to make the task accept files not ending with
the default Java source file suffix.
protected String getEncoding()
null if none yet.
protected final String readFile(File file)
throws IOException
IOException
protected void writeFile(String string,
File file)
throws IOException
getEncoding().
IOException
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||