public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck
Constructor and Description |
---|
StrictDuplicateCodeCheck()
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
beginProcessing(String aCharset)
Called when about to be called to process a set of files.
|
void |
finishProcessing()
Called when all the files have been processed.
|
protected void |
processFiltered(File aFile,
List<String> aLines)
Called to process a file that matches the specified file extensions.
|
void |
setBasedir(String aBasedir) |
void |
setMin(int aMin)
Sets the minimum number of lines that must be equivalent
before the check complains.
|
destroy, fireErrors, getMessageCollector, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatcher
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
contextualize
public StrictDuplicateCodeCheck()
public void setMin(int aMin)
aMin
- the number of lines that must be equal before
triggering a 'duplicate code' message.public void setBasedir(String aBasedir)
aBasedir
- the base directory to strip off in filenamespublic void beginProcessing(String aCharset)
AbstractFileSetCheck
beginProcessing
in interface FileSetCheck
beginProcessing
in class AbstractFileSetCheck
aCharset
- the character set used to read the files.protected void processFiltered(File aFile, List<String> aLines)
AbstractFileSetCheck
processFiltered
in class AbstractFileSetCheck
aFile
- the file to be processedaLines
- an immutable list of the contents of the file.public void finishProcessing()
AbstractFileSetCheck
finishProcessing
in interface FileSetCheck
finishProcessing
in class AbstractFileSetCheck
Copyright © 2001–2017. All rights reserved.