Package cdc.issues
Class Issue.AbstractIssueBuilder<B extends Issue.AbstractIssueBuilder<B,I>,I extends Issue>
- java.lang.Object
-
- cdc.issues.Issue.Builder
-
- cdc.issues.Issue.AbstractIssueBuilder<B,I>
-
- Enclosing class:
- Issue
public abstract static class Issue.AbstractIssueBuilder<B extends Issue.AbstractIssueBuilder<B,I>,I extends Issue> extends Issue.Builder
-
-
Field Summary
-
Fields inherited from class cdc.issues.Issue.Builder
description, domain, locations, name, params, severity, timestamp
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIssueBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BaddLocation(Location location)Adds an issue location.abstract Ibuild()Bdescription(String description)Sets the issue description.Bdomain(String domain)Sets the issue domain.Blocations(Location... locations)Sets the issue locations.Blocations(List<Location> locations)Sets the issue locations.Bname(Enum<?> name)Sets the issue name and its severity if thenameimplementsIssueSeverityItemand current severity isnull.Bname(String name)Sets the issue name.Bparams(Params params)Sets the effective parameters that have been used to configure the issue detection.BruleId(RuleId ruleId)Sets the issue RuleId.protected abstract Bself()Bseverity(IssueSeverity severity)Sets the issue severity.Issue.Buildertimestamp(Instant timestamp)Sets the issue timestamp.
-
-
-
Method Detail
-
self
protected abstract B self()
- Overrides:
selfin classIssue.Builder
-
timestamp
public Issue.Builder timestamp(Instant timestamp)
Description copied from class:Issue.BuilderSets the issue timestamp.WARNING: this should only be used to reconstruct an issue -from a file, stream, ...).
- Overrides:
timestampin classIssue.Builder- Parameters:
timestamp- The timestamp.- Returns:
- This builder.
-
ruleId
public B ruleId(RuleId ruleId)
Description copied from class:Issue.BuilderSets the issue RuleId.This is equivalent to setting its domain and name.
- Overrides:
ruleIdin classIssue.Builder- Parameters:
ruleId- The rule id.- Returns:
- This builder.
-
domain
public B domain(String domain)
Description copied from class:Issue.BuilderSets the issue domain.- Overrides:
domainin classIssue.Builder- Parameters:
domain- The domain.- Returns:
- This builder.
-
name
public B name(String name)
Description copied from class:Issue.BuilderSets the issue name.- Overrides:
namein classIssue.Builder- Parameters:
name- The name.- Returns:
- This builder.
-
name
public B name(Enum<?> name)
Description copied from class:Issue.BuilderSets the issue name and its severity if thenameimplementsIssueSeverityItemand current severity isnull.- Overrides:
namein classIssue.Builder- Parameters:
name- The name.- Returns:
- This builder.
-
params
public B params(Params params)
Description copied from class:Issue.BuilderSets the effective parameters that have been used to configure the issue detection.- Overrides:
paramsin classIssue.Builder- Parameters:
params- The parameters.- Returns:
- This builder.
-
addLocation
public B addLocation(Location location)
Description copied from class:Issue.BuilderAdds an issue location.- Overrides:
addLocationin classIssue.Builder- Parameters:
location- The location.- Returns:
- This builder.
-
locations
public B locations(Location... locations)
Description copied from class:Issue.BuilderSets the issue locations.- Overrides:
locationsin classIssue.Builder- Parameters:
locations- The locations- Returns:
- This builder.
-
locations
public B locations(List<Location> locations)
Description copied from class:Issue.BuilderSets the issue locations.- Overrides:
locationsin classIssue.Builder- Parameters:
locations- The locations- Returns:
- This builder.
-
severity
public B severity(IssueSeverity severity)
Description copied from class:Issue.BuilderSets the issue severity.- Overrides:
severityin classIssue.Builder- Parameters:
severity- The severity.- Returns:
- This builder.
-
description
public B description(String description)
Description copied from class:Issue.BuilderSets the issue description.- Overrides:
descriptionin classIssue.Builder- Parameters:
description- The description.- Returns:
- This builder.
-
build
public abstract I build()
- Overrides:
buildin classIssue.Builder
-
-