Package net.sourceforge.pmd.cpd
Class CPDReport
- java.lang.Object
-
- net.sourceforge.pmd.cpd.CPDReport
-
public class CPDReport extends Object
The result of a CPD analysis. This is rendered by aCPDReportRenderer
.- Since:
- 6.48.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CPDReport
filterMatches(Predicate<Match> filter)
Creates a new CPD report taking all the information from this report, but filtering the matches.String
getDisplayName(FileId fileId)
Return the display name of the given file.List<Match>
getMatches()
Return the list of duplication matches found by the CPD analysis.Map<FileId,Integer>
getNumberOfTokensPerFile()
Return a map containing the number of tokens by processed file.List<Report.ProcessingError>
getProcessingErrors()
Returns the list of occurred processing errors.Chars
getSourceCodeSlice(Mark mark)
Return the slice of source code where the mark was found.
-
-
-
Method Detail
-
getMatches
public List<Match> getMatches()
Return the list of duplication matches found by the CPD analysis.
-
getNumberOfTokensPerFile
public Map<FileId,Integer> getNumberOfTokensPerFile()
Return a map containing the number of tokens by processed file.
-
getProcessingErrors
public List<Report.ProcessingError> getProcessingErrors()
Returns the list of occurred processing errors.
-
getSourceCodeSlice
public Chars getSourceCodeSlice(Mark mark)
Return the slice of source code where the mark was found. This returns the entire lines from the start to the end line of the mark.
-
filterMatches
public CPDReport filterMatches(Predicate<Match> filter)
Creates a new CPD report taking all the information from this report, but filtering the matches. Note that the token count map is not filtered.- Parameters:
filter
- when true, the match will be kept.- Returns:
- copy of this report
-
-