Package org.apache.rat.annotation
Class ApacheV2LicenseAppender
java.lang.Object
org.apache.rat.annotation.AbstractLicenseAppender
org.apache.rat.annotation.ApacheV2LicenseAppender
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.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a license appender with the standard ASF license header.ApacheV2LicenseAppender
(String copyright) Create a license appender with the given copyright line. -
Method Summary
Modifier and TypeMethodDescriptiongetLicenseHeader
(File document) Gets the header text to insert into the file.Methods inherited from class org.apache.rat.annotation.AbstractLicenseAppender
append, getFirstLine, getLastLine, getLine, getType, setOverwrite
-
Constructor Details
-
ApacheV2LicenseAppender
public ApacheV2LicenseAppender()Create a license appender with the standard ASF license header. -
ApacheV2LicenseAppender
Create a license appender with the given copyright line. This should be of the form "Copyright 2008 Foo"- Parameters:
copyright
- copyright line to add to the headers.
-
-
Method Details
-
getLicenseHeader
Description copied from class:AbstractLicenseAppender
Gets the header text to insert into the file.- Specified by:
getLicenseHeader
in classAbstractLicenseAppender
- Parameters:
document
- document to extract from.- Returns:
- Get the license header of a document.
-