Class DiagnosticOptions.Builder
java.lang.Object
org.refcodes.runtime.Options.Builder
org.refcodes.runtime.DiagnosticOptions.Builder
- Enclosing class:
DiagnosticOptions
Builder for creating
DiagnosticOptions instances.
The builder follows the fluent builder pattern and allows incremental construction of option sets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance from the accumulated options.withLimit(int aLimit) Sets theDiagnosticOptions.Configuration.DIAGNOSTICS_LIMIToption.withProperty(Enum aKey, Object aValue) Adds a custom property to the options.withProperty(String aKey, Object aValue) Adds a custom property to the options.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withProperty
Adds a custom property to the options.- Overrides:
withPropertyin classOptions.Builder- Parameters:
aKey- The enumeration representing the key by resolving to its name (as ofEnum.name().aValue- the property value.- Returns:
- this builder instance
-
withProperty
Adds a custom property to the options.- Overrides:
withPropertyin classOptions.Builder- Parameters:
aKey- the property keyaValue- the property value- Returns:
- this builder instance
-
withLimit
Sets the
DiagnosticOptions.Configuration.DIAGNOSTICS_LIMIToption.The semantic interpretation of the limit value is defined by the
Schemableimplementation consuming the resultingDiagnosticOptions.- Parameters:
aLimit- the limit value to set- Returns:
- this builder instance
-
build
Builds a new instance from the accumulated options.- Overrides:
buildin classOptions.Builder- Returns:
- The accordingly constructed options.
-