Class AnalyzeResult
- java.lang.Object
-
- de.skuzzle.enforcer.restrictimports.analyze.AnalyzeResult
-
public final class AnalyzeResult extends Object
Final result of analyzing the code base for banned imports.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalyzeResult.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intanalysedFiles()The number of files that have been analysed.booleanbannedImportsFound()Returns whether at least one banned import has been found within the analyzed compile OR test source files.booleanbannedImportsInCompileCode()Returns whether at least one banned import has been found within the analyzed compile source code.booleanbannedImportsInTestCode()Returns whether at least one banned import has been found within the analyzed test source code.booleanbannedImportsOrWarningsFound()Returns wheter either a warning or a banned import has been found in any source rootstatic AnalyzeResult.Builderbuilder()Durationduration()How long the analysis took, in ms.booleanequals(Object obj)List<MatchedFile>getSrcMatches()Contains all the matches that were found within the analyzed compile source files.List<MatchedFile>getTestMatches()Contains all the matches that were found within the analyzed test source files.inthashCode()Map<BannedImportGroup,List<MatchedFile>>srcMatchesByGroup()Returns the matches that occurred in compile source files grouped by theirBannedImportGroupMap<BannedImportGroup,List<MatchedFile>>testMatchesByGroup()Returns the matches that occurred in test source files grouped by theirBannedImportGroup.StringtoString()booleanwarningsFound()booleanwarningsFoundInCompileCode()booleanwarningsFoundInTestCode()
-
-
-
Method Detail
-
builder
public static AnalyzeResult.Builder builder()
-
getSrcMatches
public List<MatchedFile> getSrcMatches()
Contains all the matches that were found within the analyzed compile source files.- Returns:
- The list of found banned imports.
-
srcMatchesByGroup
public Map<BannedImportGroup,List<MatchedFile>> srcMatchesByGroup()
Returns the matches that occurred in compile source files grouped by theirBannedImportGroup- Returns:
- The matches grouped by
BannedImportGroup
-
getTestMatches
public List<MatchedFile> getTestMatches()
Contains all the matches that were found within the analyzed test source files.- Returns:
- The list of found banned imports.
-
testMatchesByGroup
public Map<BannedImportGroup,List<MatchedFile>> testMatchesByGroup()
Returns the matches that occurred in test source files grouped by theirBannedImportGroup.- Returns:
- The matches grouped by
BannedImportGroup
-
bannedImportsOrWarningsFound
public boolean bannedImportsOrWarningsFound()
Returns wheter either a warning or a banned import has been found in any source root- Returns:
- Whether any reportable results where detected.
- Since:
- 2.2.0
-
bannedImportsFound
public boolean bannedImportsFound()
Returns whether at least one banned import has been found within the analyzed compile OR test source files.- Returns:
- Whether a banned import has been found.
-
bannedImportsInCompileCode
public boolean bannedImportsInCompileCode()
Returns whether at least one banned import has been found within the analyzed compile source code.- Returns:
- Whether a banned import has been found.
-
bannedImportsInTestCode
public boolean bannedImportsInTestCode()
Returns whether at least one banned import has been found within the analyzed test source code.- Returns:
- Whether a banned import has been found.
-
warningsFound
public boolean warningsFound()
- Returns:
- Whether warnings were detected while analysing compile or code.
- Since:
- 2.2.0
- See Also:
warningsFoundInCompileCode(),warningsFoundInTestCode()
-
warningsFoundInCompileCode
public boolean warningsFoundInCompileCode()
- Returns:
- Whether warnings were detected while analysing compile code.
- Since:
- 2.2.0
-
warningsFoundInTestCode
public boolean warningsFoundInTestCode()
- Returns:
- Whether warnings were detected while analysing test code.
- Since:
- 2.2.0
-
duration
public Duration duration()
How long the analysis took, in ms.- Returns:
- Analysis duration in ms.
-
analysedFiles
public int analysedFiles()
The number of files that have been analysed.- Returns:
- Number of files.
-
-