org.glassfish.copyright
Class PropertiesCopyright

java.lang.Object
  extended by org.glassfish.copyright.AbstractCopyright
      extended by org.glassfish.copyright.PropertiesCopyright

public class PropertiesCopyright
extends AbstractCopyright


Field Summary
 
Fields inherited from class org.glassfish.copyright.AbstractCopyright
allrights, c, licensor, thisYear, ypat
 
Constructor Summary
PropertiesCopyright(Copyright c)
           
 
Method Summary
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  boolean supports(File file)
          Is this a properties file, or other file with similar syntax?
protected  String toComment(String comment)
          Convert the comment text to .properties 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, warnCopyright, writeCopyright
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesCopyright

public PropertiesCopyright(Copyright c)
Method Detail

supports

protected boolean supports(File file)
Is this a properties file, or other file with similar syntax?

Specified by:
supports in class AbstractCopyright

readComment

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

Specified by:
readComment in class AbstractCopyright
Throws:
IOException

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 .properties syntax.

Specified by:
toComment in class AbstractCopyright


Copyright © 2012 GlassFish Community. All Rights Reserved.