org.glassfish.copyright
Class CommonCopyright

java.lang.Object
  extended by org.glassfish.copyright.AbstractCopyright
      extended by org.glassfish.copyright.CommonCopyright
Direct Known Subclasses:
JavaCopyright, JspCopyright, XmlCopyright

public abstract class CommonCopyright
extends AbstractCopyright


Field Summary
protected  boolean blankLines
           
protected  String commentEnd
           
protected  String commentPrefix
           
protected  String commentStart
           
protected  boolean movePreamble
           
 
Fields inherited from class org.glassfish.copyright.AbstractCopyright
allrights, c, licensor, thisYear, ypat
 
Constructor Summary
CommonCopyright(Copyright c)
           
 
Method Summary
protected  boolean isPreamble(String line)
          Should this line be allowed before the first comment line?
protected  String readComment(BufferedReader r)
          Read the first comment block in the file.
protected  void replaceCopyright(BufferedReader in, BufferedWriter out, String comment, String lastChanged)
          Skip the first comment block, replacing it with the correct copyright.
protected  String toComment(String comment)
          Convert the comment text to the appropriate syntax.
protected  void updateCopyright(BufferedReader in, BufferedWriter out, String lastChanged)
          Update the existing copyright statement, changing the copyright year to include lastChanged.
 
Methods inherited from class org.glassfish.copyright.AbstractCopyright
addCopyrightDate, checkCopyright, copy, err, findPrefix, fixCopyright, isModified, lastChanged, matches, repair, startsWith, startsWith, strip, supports, warnCopyright, writeCopyright
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commentStart

protected String commentStart

commentEnd

protected String commentEnd

commentPrefix

protected String commentPrefix

blankLines

protected boolean blankLines

movePreamble

protected boolean movePreamble
Constructor Detail

CommonCopyright

public CommonCopyright(Copyright c)
Method Detail

readComment

protected String readComment(BufferedReader r)
                      throws IOException
Read the first comment block in the file.

Specified by:
readComment in class AbstractCopyright
Throws:
IOException

isPreamble

protected boolean isPreamble(String line)
Should this line be allowed before the first comment line?


replaceCopyright

protected void replaceCopyright(BufferedReader in,
                                BufferedWriter out,
                                String comment,
                                String lastChanged)
                         throws IOException
Skip the first comment block, replacing it with the correct copyright.

Specified by:
replaceCopyright in class AbstractCopyright
Throws:
IOException

updateCopyright

protected void updateCopyright(BufferedReader in,
                               BufferedWriter out,
                               String lastChanged)
                        throws IOException
Update the existing copyright statement, changing the copyright year to include lastChanged.

Specified by:
updateCopyright in class AbstractCopyright
Throws:
IOException

toComment

protected String toComment(String comment)
Convert the comment text to the appropriate syntax.

Specified by:
toComment in class AbstractCopyright


Copyright © 2013 GlassFish Community. All Rights Reserved.