Package cdc.issues
Class Issue.Builder<B extends Issue.Builder<B>>
java.lang.Object
cdc.issues.Issue.Builder<B>
- Type Parameters:
B- The builder type.
- All Implemented Interfaces:
LabelsBuilding<B>,MetasBuilding<B>
- Enclosing class:
- Issue
public static class Issue.Builder<B extends Issue.Builder<B>>
extends Object
implements MetasBuilding<B>, LabelsBuilding<B>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLocation(Location location) Adds an issue location.build()description(StructuredDescription.Builder<?> description) Sets the issue description.description(Object description) Sets the issue description.description(String description) Sets the issue description.Sets the issue rule domain.Initializes this Builder with an existing issue.Sets the labels.location(LocatedItem item) Sets the issue location.Sets the issue location.Sets the issue locations.Sets the issue locations.Adds a new or replaces an existing (name, value) pair.Adds a new or modifies an existing (name, value) pair.Adds new or replaces existing (name, value) pairs.Sets the issue rule name, and optionally its severity if thenameimplementsIssueSeverityItemand current severity isnull.Sets the issue rule name.Sets the project name (may benull).Sets the issue Rule.Sets the issue RuleId.self()severity(IssueSeverity severity) Sets the issue severity.Sets the issue snapshot.Sets the issue timestamp.Sets the issue rule title.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cdc.issues.LabelsBuilding
labels, labelsMethods inherited from interface cdc.issues.MetasBuilding
meta, meta, metaIfNotNull, metas
-
Field Details
-
timestamp
-
domain
-
name
-
title
-
params
-
project
-
snapshot
-
severity
-
description
-
locations
-
metas
-
labels
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
self
- Specified by:
selfin interfaceMetasBuilding<B extends Issue.Builder<B>>- Returns:
- This builder.
-
accept
-
issue
Initializes this Builder with an existing issue.- Parameters:
issue- The issue.- Returns:
- This builder.
-
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.
-
rule
Sets the issue Rule.This is equivalent to setting its domain, name, and severity.
- Parameters:
rule- The rule.- Returns:
- This builder.
-
ruleId
Sets the issue RuleId.This is equivalent to setting its domain and name.
- Parameters:
ruleId- The rule id.- Returns:
- This builder.
-
domain
Sets the issue rule domain.- Parameters:
domain- The rule domain.- Returns:
- This builder.
-
name
Sets the issue rule name.- Parameters:
name- The rule name.- Returns:
- This builder.
-
name
Sets the issue rule name, and optionally its severity if thenameimplementsIssueSeverityItemand current severity isnull.- Parameters:
name- The rule name.- Returns:
- This builder.
-
title
Sets the issue rule title.- Parameters:
title- The rule title.- Returns:
- This builder.
-
params
-
project
Sets the project name (may benull).- Parameters:
project- The project name.- Returns:
- This builder.
-
addLocation
Adds an issue location.- Parameters:
location- The location.- Returns:
- This builder.
-
location
Sets the issue location.- Parameters:
location- The location.- Returns:
- This builder.
-
location
Sets the issue location.- Parameters:
item- TheLocatedItemwhose location is used.- Returns:
- This builder.
-
locations
Sets the issue locations.- Parameters:
locations- The locations- Returns:
- This builder.
-
locations
Sets the issue locations.- Parameters:
locations- The locations- Returns:
- This builder.
-
snapshot
Sets the issue snapshot.- Parameters:
snapshot- The snapshot identifier.- Returns:
- This builder.
-
severity
Sets the issue severity.- Parameters:
severity- The severity.- Returns:
- This builder.
-
description
Sets the issue description.- Parameters:
description- The description.- Returns:
- This builder.
-
description
Sets the issue description.The passed builder is built to a
StructuredDescriptionwhich is then converted to String.- Parameters:
description- The description.- Returns:
- This builder.
-
description
Sets the issue description.Object.toString()is used.- Parameters:
description- The description.- Returns:
- This builder.
-
meta
Description copied from interface:MetasBuildingAdds a new or replaces an existing (name, value) pair.- Specified by:
metain interfaceMetasBuilding<B extends Issue.Builder<B>>- Parameters:
name- The meta name.value- The meta value.- Returns:
- This builder.
-
meta
Description copied from interface:MetasBuildingAdds a new or modifies an existing (name, value) pair.If no value is associated to
name, behaves like meta(name, value). Otherwise, modify the value associated tonameby appendingseparatorandvalue.- Specified by:
metain interfaceMetasBuilding<B extends Issue.Builder<B>>- Parameters:
name- The meta name.value- The meta value.separator- The separator.- Returns:
- This builder.
-
metas
Description copied from interface:MetasBuildingAdds new or replaces existing (name, value) pairs.- Specified by:
metasin interfaceMetasBuilding<B extends Issue.Builder<B>>- Parameters:
metas- The meta data.- Returns:
- This builder.
-
labels
Description copied from interface:LabelsBuildingSets the labels.- Specified by:
labelsin interfaceLabelsBuilding<B extends Issue.Builder<B>>- Parameters:
labels- The labels.- Returns:
- This builder.
-
build
-