Package org.apache.maven.plugins.pmd
Klasse ExcludeDuplicationsFromFile
java.lang.Object
org.apache.maven.plugins.pmd.ExcludeDuplicationsFromFile
- Alle implementierten Schnittstellen:
ExcludeFromFile<Duplication>
This class contains utility methods to load property files which define which files
should be excluded from the CPD duplication results.
See property
pmd.excludeFromFailureFile
.- Autor:
- Andreas Dangel
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Determines how many exclusions are considered.boolean
isExcludedFromFailure
(net.sourceforge.pmd.cpd.Match errorDetail) Checks whether the givenMatch
is excluded.boolean
isExcludedFromFailure
(Duplication errorDetail) Checks whether the given violation is excluded.void
loadExcludeFromFailuresData
(String excludeFromFailureFile) Loads the exclude definitions from the given file.
-
Konstruktordetails
-
ExcludeDuplicationsFromFile
public ExcludeDuplicationsFromFile()
-
-
Methodendetails
-
isExcludedFromFailure
Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Checks whether the given violation is excluded. Note: the exclusions must have been loaded before viaExcludeFromFile.loadExcludeFromFailuresData(String)
.- Angegeben von:
isExcludedFromFailure
in SchnittstelleExcludeFromFile<Duplication>
- Parameter:
errorDetail
- the violation to check- Gibt zurück:
true
if the violation should be excluded,false
otherwise.
-
isExcludedFromFailure
public boolean isExcludedFromFailure(net.sourceforge.pmd.cpd.Match errorDetail) Checks whether the givenMatch
is excluded. Note: The exclusion must have been loaded before vialoadExcludeFromFailuresData(String)
.- Parameter:
errorDetail
- the duplication to check- Gibt zurück:
true
if the given duplication should be excluded,false
otherwise.
-
loadExcludeFromFailuresData
public void loadExcludeFromFailuresData(String excludeFromFailureFile) throws org.apache.maven.plugin.MojoExecutionException Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Loads the exclude definitions from the given file.- Angegeben von:
loadExcludeFromFailuresData
in SchnittstelleExcludeFromFile<Duplication>
- Parameter:
excludeFromFailureFile
- the path to the properties file- Löst aus:
org.apache.maven.plugin.MojoExecutionException
- if the properties file couldn't be loaded
-
countExclusions
public int countExclusions()Beschreibung aus Schnittstelle kopiert:ExcludeFromFile
Determines how many exclusions are considered.- Angegeben von:
countExclusions
in SchnittstelleExcludeFromFile<Duplication>
- Gibt zurück:
- the number of active exclusions
-