Class MatchedFile.Builder
- java.lang.Object
-
- de.skuzzle.enforcer.restrictimports.analyze.MatchedFile.Builder
-
- Enclosing class:
- MatchedFile
public static class MatchedFile.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchedFilebuild()Creates theMatchedFileinstance.MatchedFile.BuildermatchedBy(BannedImportGroup group)Sets the group that contained the banned import that caused a match for this file.MatchedFile.BuilderwithFailedToParse(boolean failedToParse)MatchedFile.BuilderwithMatchAt(int importLine, String matchedString, PackagePattern matchedBy)Records a matched import within this file.MatchedFile.BuilderwithWarnings(Warning... warnings)MatchedFile.BuilderwithWarnings(List<Warning> warnings)
-
-
-
Method Detail
-
withMatchAt
public MatchedFile.Builder withMatchAt(int importLine, String matchedString, PackagePattern matchedBy)
Records a matched import within this file.- Parameters:
importLine- The physical line number (1 based) at which the match occurred.matchedString- The string that was matched.matchedBy- ThePackagePatternthat caused this match.- Returns:
- This builder.
-
matchedBy
public MatchedFile.Builder matchedBy(BannedImportGroup group)
Sets the group that contained the banned import that caused a match for this file.- Parameters:
group- The group.- Returns:
- This builder.
-
withWarnings
public MatchedFile.Builder withWarnings(Warning... warnings)
-
withWarnings
public MatchedFile.Builder withWarnings(List<Warning> warnings)
-
withFailedToParse
public MatchedFile.Builder withFailedToParse(boolean failedToParse)
-
build
public MatchedFile build()
Creates theMatchedFileinstance.- Returns:
- The instance.
-
-