Class DetectorOptions.Builder
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.DetectorOptions.Builder
- Enclosing class:
- DetectorOptions
Class which implements Builder pattern to build DetectorOptions instance.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns new DetectorOptions instance.compileFlags
(int val) Specifies the compile-flags to compile a regular expression with and returns Builder object.private Pattern
createPattern
(String formatValue) Creates pattern to use by DetectorOptions instance.Specifies the format to use when matching lines and returns Builder object.ignoreCase
(boolean val) Specifies whether to ignore case when matching and returns Builder object.maximum
(int val) Specifies the maximum allowed number of detections and returns Builder object.Specifies message to use when reporting a match and returns Builder object.minimum
(int val) Specifies the minimum allowed number of detections and returns Builder object.Specifies the violation reporter and returns Builder object.Specifies the suppressor to use and returns Builder object.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
reporter
Specifies the violation reporter and returns Builder object.- Parameters:
val
- for reporting violations.- Returns:
- Builder object.
-
compileFlags
Specifies the compile-flags to compile a regular expression with and returns Builder object.- Parameters:
val
- the format to use when matching lines.- Returns:
- Builder object.
-
format
Specifies the format to use when matching lines and returns Builder object.- Parameters:
val
- the format to use when matching lines.- Returns:
- Builder object.
-
message
Specifies message to use when reporting a match and returns Builder object.- Parameters:
val
- message to use when reporting a match.- Returns:
- Builder object.
-
minimum
Specifies the minimum allowed number of detections and returns Builder object.- Parameters:
val
- the minimum allowed number of detections.- Returns:
- Builder object.
-
maximum
Specifies the maximum allowed number of detections and returns Builder object.- Parameters:
val
- the maximum allowed number of detections.- Returns:
- Builder object.
-
ignoreCase
Specifies whether to ignore case when matching and returns Builder object.- Parameters:
val
- whether to ignore case when matching.- Returns:
- Builder object.
-
suppressor
Specifies the suppressor to use and returns Builder object.- Parameters:
val
- the suppressor to use.- Returns:
- current instance
-
build
Returns new DetectorOptions instance.- Returns:
- DetectorOptions instance.
-
createPattern
Creates pattern to use by DetectorOptions instance.- Parameters:
formatValue
- the format to use.- Returns:
- Pattern object.
-