Interface Binder.Builder
- All Known Implementing Classes:
DefaultBinder.Builder
- Enclosing interface:
- Binder
public static interface Binder.Builder
Builder for creating customized Binder instances.
-
Method Summary
Modifier and TypeMethodDescription@NotNull Binderbuild()Builds the binder.@NotNull Binder.BuilderimplicitDefaults(boolean enabled) Enables or disables implicit defaults.@NotNull Binder.BuildernodePreprocessor(@NotNull ConfigNodePreprocessor preprocessor) Sets a node preprocessor for transforming nodes before binding.@NotNull Binder.Builderserializers(@NotNull TypeSerializerRegistry registry) Sets the serializer registry.@NotNull Binder.BuilderuseConstructorBinding(boolean enabled) Enables or disables constructor binding.@NotNull Binder.BuilderSets the validator.
-
Method Details
-
serializers
Sets the serializer registry.- Parameters:
registry- the registry- Returns:
- this builder
-
validator
Sets the validator.- Parameters:
validator- the validator- Returns:
- this builder
-
implicitDefaults
Enables or disables implicit defaults.- Parameters:
enabled- true to enable- Returns:
- this builder
-
useConstructorBinding
Enables or disables constructor binding.- Parameters:
enabled- true to enable- Returns:
- this builder
-
nodePreprocessor
@NotNull @NotNull Binder.Builder nodePreprocessor(@NotNull @NotNull ConfigNodePreprocessor preprocessor) Sets a node preprocessor for transforming nodes before binding.The preprocessor is called for each node before deserialization. This is used for resolving config references (
${...}).- Parameters:
preprocessor- the preprocessor- Returns:
- this builder
-
build
Builds the binder.- Returns:
- the binder
-