Class ContextConfiguration.Builder
- Enclosing class:
ContextConfiguration
ContextConfiguration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newContextConfiguration.from(ContextConfigurationIF instance) Fill a builder with attribute values from the providedContextConfigurationIFinstance.setDeferLargeObjects(boolean deferLargeObjects) Initializes the value for thedeferLargeObjectsattribute.setDeferredExecutionMode(boolean deferredExecutionMode) Initializes the value for thedeferredExecutionModeattribute.setDynamicVariableResolver(DynamicVariableResolver dynamicVariableResolver) Initializes the value for thedynamicVariableResolverattribute.setErrorHandlingStrategy(ErrorHandlingStrategy errorHandlingStrategy) Initializes the value for theerrorHandlingStrategyattribute.setExpressionStrategy(ExpressionStrategy expressionStrategy) Initializes the value for theexpressionStrategyattribute.setPartialMacroEvaluation(boolean partialMacroEvaluation) Initializes the value for thepartialMacroEvaluationattribute.setUnwrapRawOverride(boolean unwrapRawOverride) Initializes the value for theunwrapRawOverrideattribute.setValidationMode(boolean validationMode) Initializes the value for thevalidationModeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedContextConfigurationIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setExpressionStrategy
public final ContextConfiguration.Builder setExpressionStrategy(ExpressionStrategy expressionStrategy) Initializes the value for theexpressionStrategyattribute.If not set, this attribute will have a default value as returned by the initializer of
expressionStrategy.- Parameters:
expressionStrategy- The value for expressionStrategy- Returns:
thisbuilder for use in a chained invocation
-
setDynamicVariableResolver
public final ContextConfiguration.Builder setDynamicVariableResolver(@Nullable DynamicVariableResolver dynamicVariableResolver) Initializes the value for thedynamicVariableResolverattribute.- Parameters:
dynamicVariableResolver- The value for dynamicVariableResolver (can benull)- Returns:
thisbuilder for use in a chained invocation
-
setValidationMode
Initializes the value for thevalidationModeattribute.If not set, this attribute will have a default value as returned by the initializer of
validationMode.- Parameters:
validationMode- The value for validationMode- Returns:
thisbuilder for use in a chained invocation
-
setDeferredExecutionMode
Initializes the value for thedeferredExecutionModeattribute.If not set, this attribute will have a default value as returned by the initializer of
deferredExecutionMode.- Parameters:
deferredExecutionMode- The value for deferredExecutionMode- Returns:
thisbuilder for use in a chained invocation
-
setDeferLargeObjects
Initializes the value for thedeferLargeObjectsattribute.If not set, this attribute will have a default value as returned by the initializer of
deferLargeObjects.- Parameters:
deferLargeObjects- The value for deferLargeObjects- Returns:
thisbuilder for use in a chained invocation
-
setPartialMacroEvaluation
Initializes the value for thepartialMacroEvaluationattribute.If not set, this attribute will have a default value as returned by the initializer of
partialMacroEvaluation.- Parameters:
partialMacroEvaluation- The value for partialMacroEvaluation- Returns:
thisbuilder for use in a chained invocation
-
setUnwrapRawOverride
Initializes the value for theunwrapRawOverrideattribute.If not set, this attribute will have a default value as returned by the initializer of
unwrapRawOverride.- Parameters:
unwrapRawOverride- The value for unwrapRawOverride- Returns:
thisbuilder for use in a chained invocation
-
setErrorHandlingStrategy
public final ContextConfiguration.Builder setErrorHandlingStrategy(ErrorHandlingStrategy errorHandlingStrategy) Initializes the value for theerrorHandlingStrategyattribute.If not set, this attribute will have a default value as returned by the initializer of
errorHandlingStrategy.- Parameters:
errorHandlingStrategy- The value for errorHandlingStrategy- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newContextConfiguration.- Returns:
- An immutable instance of ContextConfiguration
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-