Class ApacheV2LicenceAppender

  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
          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


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


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

copyright - copyright line.
Method Detail


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

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