org.apache.rat.annotation
Class ApacheV2LicenceAppender

java.lang.Object
  extended by org.apache.rat.annotation.AbstractLicenceAppender
      extended by org.apache.rat.annotation.ApacheV2LicenceAppender

public class ApacheV2LicenceAppender
extends AbstractLicenceAppender

Add an Apache Licence V2 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
ApacheV2LicenceAppender()
          Create a licence appender with the standard ASF licence header.
ApacheV2LicenceAppender(String copyright)
          Create a licence appender with the given copyright line.
 
Method Summary
 String getLicenceHeader(File document)
           
 
Methods inherited from class org.apache.rat.annotation.AbstractLicenceAppender
append, getFirstLine, getLastLine, getLine, getType, setForce
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApacheV2LicenceAppender

public ApacheV2LicenceAppender()
Create a licence appender with the standard ASF licence header.


ApacheV2LicenceAppender

public ApacheV2LicenceAppender(String copyright)
Create a licence appender with the given copyright line. This should be of the form "Copyright 2008 Foo"

Parameters:
copyright - copyright line.
Method Detail

getLicenceHeader

public String getLicenceHeader(File document)
Specified by:
getLicenceHeader in class AbstractLicenceAppender
Parameters:
document - document to extract from.
Returns:
Get the licence header of a document.


Copyright © 2006–2014 Apache Software Foundation. All rights reserved.