public class TextCopyright extends AbstractCopyright
| Constructor and Description |
|---|
TextCopyright(Copyright c) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
matches(Pattern pat,
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 String |
readComment(BufferedReader r)
Read the first comment block in a non-Java file.
|
protected void |
repair(File file,
String comment,
org.glassfish.copyright.AbstractCopyright.RepairType type)
Repair the c.errors 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 plain text file?
|
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.
|
addCopyrightDate, checkCopyright, copy, err, findPrefix, fixCopyright, isModified, lastChanged, matches, startsWith, startsWith, strip, warnCopyright, writeCopyrightpublic TextCopyright(Copyright c)
protected boolean supports(File file)
supports in class AbstractCopyrightprotected String readComment(BufferedReader r) throws IOException
readComment in class AbstractCopyrightIOExceptionprotected boolean matches(Pattern pat, String s)
matches in class AbstractCopyrightprotected void repair(File file, String comment, org.glassfish.copyright.AbstractCopyright.RepairType type) throws IOException
repair in class AbstractCopyrightIOExceptionprotected void replaceCopyright(BufferedReader in, BufferedWriter out, String comment, String lastChanged) throws IOException
replaceCopyright in class AbstractCopyrightIOExceptionprotected void updateCopyright(BufferedReader in, BufferedWriter out, String lastChanged) throws IOException
updateCopyright in class AbstractCopyrightIOExceptionprotected String toComment(String comment)
toComment in class AbstractCopyrightCopyright © 2017 GlassFish Community. All Rights Reserved.