|
||||||||||
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(java.io.File document)
Append the default licence header to the supplied document. |
protected java.lang.String |
getFirstLine(int type)
Get the first line of the licence header formatted for the given type of file. |
protected java.lang.String |
getLastLine(int type)
Get the last line of the licence header formatted for the given type of file. |
abstract java.lang.String |
getLicenceHeader(java.io.File document)
Get the licence header for a document. |
protected java.lang.String |
getLine(int type,
java.lang.String content)
Get a line of the licence header formatted for the given type of file. |
protected int |
getType(java.io.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(java.io.File document) throws java.io.IOException
document
-
java.io.IOException
- if there is a problem either reading or writing the fileprotected int getType(java.io.File document)
document
-
public void setForce(boolean b)
b
- public abstract java.lang.String getLicenceHeader(java.io.File document)
protected java.lang.String getFirstLine(int type)
type
- the type of file, see the TYPE_* constants
protected java.lang.String getLastLine(int type)
type
- the type of file, see the TYPE_* constants
protected java.lang.String getLine(int type, java.lang.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 |