|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.rat.annotation.AbstractLicenceAppender
public abstract class AbstractLicenceAppender
Add a licence header to a document. This appender does not check for the existence of an existing licence header, it is assumed that either a second licence header is intentional or that there is no licence header present already.
Constructor Summary | |
---|---|
AbstractLicenceAppender()
|
Method Summary | |
---|---|
void |
append(File document)
Append the default licence header to the supplied document. |
protected String |
getFirstLine(int type)
Get the first line of the licence header formatted for the given type of file. |
protected String |
getLastLine(int type)
Get the last line of the licence header formatted for the given type of file. |
abstract String |
getLicenceHeader(File document)
Get the licence header for a document. |
protected String |
getLine(int type,
String content)
Get a line of the licence header formatted for the given type of file. |
protected int |
getType(File document)
Detect the type of document. |
void |
setForce(boolean b)
Set the force flag on this appender. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLicenceAppender()
Method Detail |
---|
public void append(File document) throws IOException
document
-
IOException
- if there is a problem either reading or writing the fileprotected int getType(File document)
document
-
public void setForce(boolean b)
b
- public abstract String getLicenceHeader(File document)
protected String getFirstLine(int type)
type
- the type of file, see the TYPE_* constants
protected String getLastLine(int type)
type
- the type of file, see the TYPE_* constants
protected String getLine(int type, String content)
type
- the type of file, see the TYPE_* constantscontent
- the content for this line
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |