public class TextCopyright extends AbstractCopyright
allrights, c, thisYear, ylpat, ylpat_YEAR, ypat, ypat_YEAR, ytpat| Constructor and Description |
|---|
TextCopyright(Copyright c) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
matches(java.util.regex.Pattern pat,
java.lang.String s)
Does the string match the pattern?
Since we don't know where the comment text might end,
we just insist that it match starting at the beginning
of the text.
|
protected java.lang.String |
readComment(java.io.BufferedReader r)
Read the first comment block in a non-Java file.
|
protected void |
repair(java.io.File file,
java.lang.String comment,
org.glassfish.copyright.AbstractCopyright.RepairType type)
Repair the c.errors in the file.
|
protected void |
replaceCopyright(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String comment,
java.lang.String lastChanged)
Skip the first comment block, replacing it with the correct copyright.
|
protected boolean |
supports(java.io.File file)
Is this a plain text file?
|
protected java.lang.String |
toComment(java.lang.String comment)
Convert the comment text to the appropriate syntax.
|
protected void |
updateCopyright(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String lastChanged)
Update the existing copyright statement, changing the copyright
year to include lastChanged.
|
addCopyrightDate, checkCopyright, copy, err, findPrefix, fixCopyright, fixCopyright, getCopyrights, isModified, lastChanged, matches, startsWith, startsWith, strip, warnCopyright, writeCopyrightpublic TextCopyright(Copyright c)
protected boolean supports(java.io.File file)
supports in class AbstractCopyrightprotected java.lang.String readComment(java.io.BufferedReader r)
throws java.io.IOException
readComment in class AbstractCopyrightjava.io.IOExceptionprotected boolean matches(java.util.regex.Pattern pat,
java.lang.String s)
matches in class AbstractCopyrightprotected void repair(java.io.File file,
java.lang.String comment,
org.glassfish.copyright.AbstractCopyright.RepairType type)
throws java.io.IOException
repair in class AbstractCopyrightjava.io.IOExceptionprotected void replaceCopyright(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String comment,
java.lang.String lastChanged)
throws java.io.IOException
replaceCopyright in class AbstractCopyrightjava.io.IOExceptionprotected void updateCopyright(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String lastChanged)
throws java.io.IOException
updateCopyright in class AbstractCopyrightjava.io.IOExceptionprotected java.lang.String toComment(java.lang.String comment)
toComment in class AbstractCopyrightCopyright © 2018 GlassFish Community. All Rights Reserved.