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

      • copyright

        private java.lang.String copyright
    • 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 class AbstractLicenseAppender
        Parameters:
        document - document to extract from.
        Returns:
        Get the license header of a document.