public class CpdParameters
extends java.lang.Object
CpdRunner to control the CPD analysis.| Constructor and Description |
|---|
CpdParameters() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEncoding()
Get the encoding used by CPD to read the source files and to produce the report.
|
java.lang.String |
getLanguage()
Get the language of the source files to analyze, e.g.
|
int |
getMinimumTokenCount()
The minimum duplicate size to be reported.
|
java.lang.String |
getSkipBlocksPattern()
Specifies the pattern to find the blocks to skip when
skipBlocks is true. |
boolean |
isIgnoreAnnotations()
If true, annotations will be ignored.
|
boolean |
isIgnoreIdentifiers()
If true, differences in identifiers (like variable names or methods names) will be ignored in
the same way as literals in
isIgnoreLiterals(). |
boolean |
isIgnoreLiterals()
If true, CPD ignores literal value differences when evaluating a duplicate block.
|
boolean |
isIgnoreUsings()
If true,
using directives in C# will be ignored when comparing text. |
boolean |
isSkipBlocks()
If true, skipping of blocks is enabled with the patterns specified in the
skipBlocksPattern property. |
boolean |
isSkipDuplicateFiles()
If true, CPD will ignore multiple copies of files with the same name and length.
|
boolean |
isSkipLexicalErrors()
If true, CPD will skip files which can't be tokenized due to invalid characters instead of
aborting the analysis.
|
void |
setEncoding(java.lang.String pEncoding) |
void |
setIgnoreAnnotations(boolean pIgnoreAnnotations) |
void |
setIgnoreIdentifiers(boolean pIgnoreIdentifiers) |
void |
setIgnoreLiterals(boolean pIgnoreLiterals) |
void |
setIgnoreUsings(boolean pIgnoreUsings) |
void |
setLanguage(java.lang.String pLanguage) |
void |
setMinimumTokenCount(int pMinimumTokenCount) |
void |
setSkipBlocks(boolean pSkipBlocks) |
void |
setSkipBlocksPattern(java.lang.String pSkipBlocksPattern) |
void |
setSkipDuplicateFiles(boolean pSkipDuplicateFiles) |
void |
setSkipLexicalErrors(boolean pSkipLexicalErrors) |
public java.lang.String getLanguage()
public void setLanguage(java.lang.String pLanguage)
public java.lang.String getEncoding()
public void setEncoding(java.lang.String pEncoding)
public int getMinimumTokenCount()
public void setMinimumTokenCount(int pMinimumTokenCount)
public boolean isIgnoreLiterals()
foo=42; and foo=43; will be seen as equivalent. Default is false.public void setIgnoreLiterals(boolean pIgnoreLiterals)
public boolean isIgnoreIdentifiers()
isIgnoreLiterals(). Default is false.public void setIgnoreIdentifiers(boolean pIgnoreIdentifiers)
public boolean isIgnoreAnnotations()
public void setIgnoreAnnotations(boolean pIgnoreAnnotations)
public boolean isIgnoreUsings()
using directives in C# will be ignored when comparing text. Default is
false.using directives should be ignored, false if they should count.public void setIgnoreUsings(boolean pIgnoreUsings)
public boolean isSkipDuplicateFiles()
public void setSkipDuplicateFiles(boolean pSkipDuplicateFiles)
public boolean isSkipLexicalErrors()
public void setSkipLexicalErrors(boolean pSkipLexicalErrors)
public boolean isSkipBlocks()
skipBlocksPattern property. Default is false.skipBlocksPattern should be skipped, false if not.public void setSkipBlocks(boolean pSkipBlocks)
public java.lang.String getSkipBlocksPattern()
skipBlocks is true. The string
value contains two parts, separated by a vertical line ('|'). The first part is the start
pattern, the second part is the end pattern. The default value is "#if 0|#endif".public void setSkipBlocksPattern(java.lang.String pSkipBlocksPattern)