public abstract class AbstractLicenseAppender extends Object
Constructor and Description |
---|
AbstractLicenseAppender(Log log)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
append(File document)
Append the default license header to the supplied document.
|
protected String |
getFirstLine(int type)
Get the first line of the license header formatted
for the given type of file.
|
protected String |
getLastLine(int type)
Get the last line of the license header formatted
for the given type of file.
|
abstract String |
getLicenseHeader(File document) |
protected String |
getLine(int type,
String content)
Get a line of the license header formatted
for the given type of file.
|
protected int |
getType(File document)
Detect the type of document.
|
void |
setForce(boolean force)
Set the force flag on this appender.
|
public AbstractLicenseAppender(Log log)
log
- The log to use.public void append(File document) throws IOException
document
- document to append to.IOException
- if there is a problem while reading or writing the fileprotected int getType(File document)
document
- to retrieve type from.public void setForce(boolean force)
force
- force flag.public abstract String getLicenseHeader(File document)
document
- document to extract from.protected String getFirstLine(int type)
type
- the type of file, see the TYPE_* constantsprotected String getLastLine(int type)
type
- the type of file, see the TYPE_* constantsCopyright © 2006–2024 Apache Software Foundation. All rights reserved.