Package net.sourceforge.pmd.cpd
Class CPDConfiguration
- java.lang.Object
-
- net.sourceforge.pmd.AbstractConfiguration
-
- net.sourceforge.pmd.cpd.CPDConfiguration
-
public class CPDConfiguration extends AbstractConfiguration
- Author:
- Brian Remedios, Romain Pelisse - <belaran@gmail.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CPDConfiguration.LanguageConverter
Deprecated.Don't use this.
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LANGUAGE
static String
DEFAULT_RENDERER
-
Constructor Summary
Constructors Constructor Description CPDConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FilenameFilter
filenameFilter()
CPDRenderer
getCPDRenderer()
Deprecated.Internal API.static CPDRenderer
getCPDRendererFromString(String name, String encoding)
Deprecated.Internal APIString
getEncoding()
Deprecated.useAbstractConfiguration.getSourceEncoding()
insteadList<File>
getExcludes()
String
getFileListPath()
List<File>
getFiles()
Language
getLanguage()
static Language
getLanguageFromString(String languageString)
int
getMinimumTileSize()
Renderer
getRenderer()
Deprecated.Internal API.static Renderer
getRendererFromString(String name, String encoding)
Deprecated.Internal APIString
getRendererName()
static String[]
getRenderers()
String
getSkipBlocksPattern()
String
getURI()
boolean
isDebug()
Return the debug indicator.boolean
isFailOnViolation()
boolean
isHelp()
boolean
isIgnoreAnnotations()
boolean
isIgnoreIdentifiers()
boolean
isIgnoreLiterals()
boolean
isIgnoreLiteralSequences()
boolean
isIgnoreUsings()
boolean
isNonRecursive()
boolean
isNoSkipBlocks()
boolean
isSkipDuplicates()
boolean
isSkipLexicalErrors()
void
postContruct()
void
setCPDRenderer(CPDRenderer renderer)
Deprecated.Internal API.void
setDebug(boolean debug)
Set the debug indicator.void
setEncoding(String encoding)
Deprecated.UseAbstractConfiguration.setSourceEncoding(String)
insteadvoid
setExcludes(List<File> excludes)
void
setFailOnViolation(boolean failOnViolation)
void
setFileListPath(String fileListPath)
void
setFiles(List<File> files)
void
setHelp(boolean help)
void
setIgnoreAnnotations(boolean ignoreAnnotations)
void
setIgnoreIdentifiers(boolean ignoreIdentifiers)
void
setIgnoreLiterals(boolean ignoreLiterals)
void
setIgnoreLiteralSequences(boolean ignoreLiteralSequences)
void
setIgnoreUsings(boolean ignoreUsings)
void
setLanguage(Language language)
void
setMinimumTileSize(int minimumTileSize)
void
setNonRecursive(boolean nonRecursive)
void
setNoSkipBlocks(boolean noSkipBlocks)
void
setRenderer(Renderer renderer)
Deprecated.Internal API.void
setRendererName(String rendererName)
void
setSkipBlocksPattern(String skipBlocksPattern)
void
setSkipDuplicates(boolean skipDuplicates)
void
setSkipLexicalErrors(boolean skipLexicalErrors)
static void
setSystemProperties(CPDConfiguration configuration)
void
setURI(String uri)
SourceCode
sourceCodeFor(File file)
SourceCode
sourceCodeFor(Reader reader, String sourceCodeName)
Tokenizer
tokenizer()
-
Methods inherited from class net.sourceforge.pmd.AbstractConfiguration
getSourceEncoding, setSourceEncoding
-
-
-
-
Field Detail
-
DEFAULT_LANGUAGE
public static final String DEFAULT_LANGUAGE
- See Also:
- Constant Field Values
-
DEFAULT_RENDERER
public static final String DEFAULT_RENDERER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setEncoding
@Deprecated public void setEncoding(String encoding)
Deprecated.UseAbstractConfiguration.setSourceEncoding(String)
instead
-
sourceCodeFor
public SourceCode sourceCodeFor(File file)
-
sourceCodeFor
public SourceCode sourceCodeFor(Reader reader, String sourceCodeName)
-
postContruct
public void postContruct()
-
getRendererFromString
@Deprecated @InternalApi public static Renderer getRendererFromString(String name, String encoding)
Deprecated.Internal API
-
getCPDRendererFromString
@Deprecated @InternalApi public static CPDRenderer getCPDRendererFromString(String name, String encoding)
Deprecated.Internal API
-
getRenderers
public static String[] getRenderers()
-
setSystemProperties
public static void setSystemProperties(CPDConfiguration configuration)
-
getLanguage
public Language getLanguage()
-
setLanguage
public void setLanguage(Language language)
-
getMinimumTileSize
public int getMinimumTileSize()
-
setMinimumTileSize
public void setMinimumTileSize(int minimumTileSize)
-
isSkipDuplicates
public boolean isSkipDuplicates()
-
setSkipDuplicates
public void setSkipDuplicates(boolean skipDuplicates)
-
getRendererName
public String getRendererName()
-
setRendererName
public void setRendererName(String rendererName)
-
getRenderer
@Deprecated @InternalApi public Renderer getRenderer()
Deprecated.Internal API.
-
getCPDRenderer
@Deprecated @InternalApi public CPDRenderer getCPDRenderer()
Deprecated.Internal API.
-
tokenizer
public Tokenizer tokenizer()
-
filenameFilter
public FilenameFilter filenameFilter()
-
setRenderer
@Deprecated @InternalApi public void setRenderer(Renderer renderer)
Deprecated.Internal API. UsesetRendererName(String)
instead.- Parameters:
renderer
-
-
setCPDRenderer
@Deprecated @InternalApi public void setCPDRenderer(CPDRenderer renderer)
Deprecated.Internal API. UsesetRendererName(String)
instead.- Parameters:
renderer
-
-
isIgnoreLiterals
public boolean isIgnoreLiterals()
-
setIgnoreLiterals
public void setIgnoreLiterals(boolean ignoreLiterals)
-
isIgnoreIdentifiers
public boolean isIgnoreIdentifiers()
-
setIgnoreIdentifiers
public void setIgnoreIdentifiers(boolean ignoreIdentifiers)
-
isIgnoreAnnotations
public boolean isIgnoreAnnotations()
-
setIgnoreAnnotations
public void setIgnoreAnnotations(boolean ignoreAnnotations)
-
isIgnoreUsings
public boolean isIgnoreUsings()
-
setIgnoreUsings
public void setIgnoreUsings(boolean ignoreUsings)
-
isIgnoreLiteralSequences
public boolean isIgnoreLiteralSequences()
-
setIgnoreLiteralSequences
public void setIgnoreLiteralSequences(boolean ignoreLiteralSequences)
-
isSkipLexicalErrors
public boolean isSkipLexicalErrors()
-
setSkipLexicalErrors
public void setSkipLexicalErrors(boolean skipLexicalErrors)
-
getFileListPath
public String getFileListPath()
-
setFileListPath
public void setFileListPath(String fileListPath)
-
getURI
public String getURI()
-
setURI
public void setURI(String uri)
-
isNonRecursive
public boolean isNonRecursive()
-
setNonRecursive
public void setNonRecursive(boolean nonRecursive)
-
isHelp
public boolean isHelp()
-
setHelp
public void setHelp(boolean help)
-
getEncoding
@Deprecated public String getEncoding()
Deprecated.useAbstractConfiguration.getSourceEncoding()
instead- Returns:
-
isNoSkipBlocks
public boolean isNoSkipBlocks()
-
setNoSkipBlocks
public void setNoSkipBlocks(boolean noSkipBlocks)
-
getSkipBlocksPattern
public String getSkipBlocksPattern()
-
setSkipBlocksPattern
public void setSkipBlocksPattern(String skipBlocksPattern)
-
isFailOnViolation
public boolean isFailOnViolation()
-
setFailOnViolation
public void setFailOnViolation(boolean failOnViolation)
-
isDebug
public boolean isDebug()
Description copied from class:AbstractConfiguration
Return the debug indicator. If this value istrue
then PMD will log debug information.- Overrides:
isDebug
in classAbstractConfiguration
- Returns:
true
if debug logging is enabled,false
otherwise.
-
setDebug
public void setDebug(boolean debug)
Description copied from class:AbstractConfiguration
Set the debug indicator.- Overrides:
setDebug
in classAbstractConfiguration
- Parameters:
debug
- The debug indicator to set.- See Also:
AbstractConfiguration.isDebug()
-
-