Package org.apache.rat.annotation
Class ApacheV2LicenseAppender
- java.lang.Object
-
- org.apache.rat.annotation.AbstractLicenseAppender
-
- org.apache.rat.annotation.ApacheV2LicenseAppender
-
public class ApacheV2LicenseAppender extends AbstractLicenseAppender
Add an Apache License V2 license header to a document. This appender does not check for the existence of an existing license header, it is assumed that either a second license header is intentional or that there is no license header present already.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
copyright
-
Constructor Summary
Constructors Constructor Description ApacheV2LicenseAppender()
Create a license appender with the standard ASF license header.ApacheV2LicenseAppender(java.lang.String copyright)
Create a license appender with the given copyright line.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLicenseHeader(java.io.File document)
-
Methods inherited from class org.apache.rat.annotation.AbstractLicenseAppender
append, getFirstLine, getLastLine, getLine, getType, setForce
-
-
-
-
Constructor Detail
-
ApacheV2LicenseAppender
public ApacheV2LicenseAppender()
Create a license appender with the standard ASF license header.
-
ApacheV2LicenseAppender
public ApacheV2LicenseAppender(java.lang.String copyright)
Create a license appender with the given copyright line. This should be of the form "Copyright 2008 Foo"- Parameters:
copyright
- copyright line.
-
-
Method Detail
-
getLicenseHeader
public java.lang.String getLicenseHeader(java.io.File document)
- Specified by:
getLicenseHeader
in classAbstractLicenseAppender
- Parameters:
document
- document to extract from.- Returns:
- Get the license header of a document.
-
-