public class HeaderCheck extends AbstractHeaderCheck
| Modifier and Type | Field and Description |
|---|---|
private static int[] |
EMPTY_INT_ARRAY
Empty array to avoid instantiations.
|
private int[] |
ignoreLines
The header lines to ignore in the check, sorted.
|
static java.lang.String |
MSG_MISMATCH
A key is pointing to the warning message text in "messages.properties"
file.
|
static java.lang.String |
MSG_MISSING
A key is pointing to the warning message text in "messages.properties"
file.
|
| Constructor and Description |
|---|
HeaderCheck() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
isIgnoreLine(int lineNo)
Returns true if lineNo is header lines or false.
|
protected boolean |
isMatch(int lineNumber,
java.lang.String line)
Checks if a code line matches the required header line.
|
protected void |
postProcessHeaderLines()
Hook method for post processing header lines.
|
protected void |
processFiltered(java.io.File file,
java.util.List<java.lang.String> lines)
Called to process a file that matches the specified file extensions.
|
void |
setIgnoreLines(int... list)
Set the lines numbers to ignore in the header check.
|
finishLocalSetup, getExternalResourceLocations, getHeaderLines, setCharset, setHeader, setHeaderFilebeginProcessing, destroy, finishProcessing, fireErrors, getFileExtensions, getMessageCollector, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatchergetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigurecontextualizepublic static final java.lang.String MSG_MISSING
public static final java.lang.String MSG_MISMATCH
private static final int[] EMPTY_INT_ARRAY
private int[] ignoreLines
private boolean isIgnoreLine(int lineNo)
lineNo - a line numberlineNo is one of the ignored header lines.protected boolean isMatch(int lineNumber,
java.lang.String line)
lineNumber - the line number to check against the headerline - the line contentspublic void setIgnoreLines(int... list)
list - comma separated list of line numbers to ignore in header.protected void processFiltered(java.io.File file,
java.util.List<java.lang.String> lines)
AbstractFileSetCheckprocessFiltered in class AbstractFileSetCheckfile - the file to be processedlines - an immutable list of the contents of the file.protected void postProcessHeaderLines()
AbstractHeaderCheckpostProcessHeaderLines in class AbstractHeaderCheck