Package cdc.issues
Class Issue.Builder
- java.lang.Object
-
- cdc.issues.Issue.Builder
-
- Direct Known Subclasses:
Issue.AbstractIssueBuilder
- Enclosing class:
- Issue
public static class Issue.Builder extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Issue.BuilderaddLocation(Location location)Adds an issue location.Issuebuild()Issue.Builderdescription(String description)Sets the issue description.Issue.Builderdomain(String domain)Sets the issue domain.Issue.Builderlocations(Location... locations)Sets the issue locations.Issue.Builderlocations(List<Location> locations)Sets the issue locations.Issue.Buildername(Enum<?> name)Sets the issue name and its severity if thenameimplementsIssueSeverityItemand current severity isnull.Issue.Buildername(String name)Sets the issue name.Issue.Builderparams(Params params)Sets the effective parameters that have been used to configure the issue detection.Issue.BuilderruleId(RuleId ruleId)Sets the issue RuleId.protected Issue.Builderself()Issue.Builderseverity(IssueSeverity severity)Sets the issue severity.Issue.Buildertimestamp(Instant timestamp)Sets the issue timestamp.
-
-
-
Method Detail
-
self
protected Issue.Builder self()
-
timestamp
public Issue.Builder timestamp(Instant timestamp)
Sets the issue timestamp.WARNING: this should only be used to reconstruct an issue -from a file, stream, ...).
- Parameters:
timestamp- The timestamp.- Returns:
- This builder.
-
ruleId
public Issue.Builder ruleId(RuleId ruleId)
Sets the issue RuleId.This is equivalent to setting its domain and name.
- Parameters:
ruleId- The rule id.- Returns:
- This builder.
-
domain
public Issue.Builder domain(String domain)
Sets the issue domain.- Parameters:
domain- The domain.- Returns:
- This builder.
-
name
public Issue.Builder name(String name)
Sets the issue name.- Parameters:
name- The name.- Returns:
- This builder.
-
name
public Issue.Builder name(Enum<?> name)
Sets the issue name and its severity if thenameimplementsIssueSeverityItemand current severity isnull.- Parameters:
name- The name.- Returns:
- This builder.
-
params
public Issue.Builder params(Params params)
Sets the effective parameters that have been used to configure the issue detection.- Parameters:
params- The parameters.- Returns:
- This builder.
-
addLocation
public Issue.Builder addLocation(Location location)
Adds an issue location.- Parameters:
location- The location.- Returns:
- This builder.
-
locations
public Issue.Builder locations(Location... locations)
Sets the issue locations.- Parameters:
locations- The locations- Returns:
- This builder.
-
locations
public Issue.Builder locations(List<Location> locations)
Sets the issue locations.- Parameters:
locations- The locations- Returns:
- This builder.
-
severity
public Issue.Builder severity(IssueSeverity severity)
Sets the issue severity.- Parameters:
severity- The severity.- Returns:
- This builder.
-
description
public Issue.Builder description(String description)
Sets the issue description.- Parameters:
description- The description.- Returns:
- This builder.
-
build
public Issue build()
-
-