Package com.networknt.schema
Class ExecutionConfig.BuilderSupport<T>
- java.lang.Object
-
- com.networknt.schema.ExecutionConfig.BuilderSupport<T>
-
- Direct Known Subclasses:
ExecutionConfig.Builder
- Enclosing class:
- ExecutionConfig
public abstract static class ExecutionConfig.BuilderSupport<T> extends Object
Builder forExecutionConfig.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanannotationCollectionEnabledprotected Predicate<String>annotationCollectionFilterprotected booleanfailFastprotected BooleanformatAssertionsEnabledprotected Localelocaleprotected BooleanreadOnlyprotected BooleanwriteOnly
-
Constructor Summary
Constructors Constructor Description BuilderSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TannotationCollectionEnabled(boolean annotationCollectionEnabled)Sets whether the annotation collection is enabled.TannotationCollectionFilter(Predicate<String> annotationCollectionFilter)Predicate to determine if annotation collection is allowed for a particular keyword.ExecutionConfigbuild()Builds theExecutionConfig.TfailFast(boolean failFast)Sets whether fast fail is enabled.TformatAssertionsEnabled(Boolean formatAssertionsEnabled)Sets the format assertion enabled flag.Tlocale(Locale locale)Sets the locale to use for formatting messages.TreadOnly(Boolean readOnly)protected abstract Tself()TwriteOnly(Boolean writeOnly)
-
-
-
Method Detail
-
self
protected abstract T self()
-
locale
public T locale(Locale locale)
Sets the locale to use for formatting messages.- Parameters:
locale- the locale- Returns:
- the builder
-
annotationCollectionEnabled
public T annotationCollectionEnabled(boolean annotationCollectionEnabled)
Sets whether the annotation collection is enabled.This does not affect annotation collection required for evaluating keywords such as unevaluatedItems or unevaluatedProperties and only affects reporting.
The annotations to collect can be customized using the annotation collection predicate.
- Parameters:
annotationCollectionEnabled- true to enable annotation collection- Returns:
- the builder
-
annotationCollectionFilter
public T annotationCollectionFilter(Predicate<String> annotationCollectionFilter)
Predicate to determine if annotation collection is allowed for a particular keyword. This only has an effect if annotation collection is enabled.The default value is to not collect any annotation keywords if annotation collection is enabled.
This does not affect annotation collection required for evaluating keywords such as unevaluatedItems or unevaluatedProperties and only affects reporting.
- Parameters:
annotationCollectionFilter- the predicate accepting the keyword- Returns:
- the builder
-
formatAssertionsEnabled
public T formatAssertionsEnabled(Boolean formatAssertionsEnabled)
Sets the format assertion enabled flag.- Parameters:
formatAssertionsEnabled- the format assertions enabled flag- Returns:
- the builder
-
failFast
public T failFast(boolean failFast)
Sets whether fast fail is enabled.- Parameters:
failFast- true to fast fail- Returns:
- the builder
-
build
public ExecutionConfig build()
Builds theExecutionConfig.- Returns:
- the execution configuration
-
-