public interface ConfigBuilder
Config. Makes it easy to create a
configuration over several files. When creating a configuration one can opt
to use a custom serializer collection
and its possible to activate validation via withValidatorFactory(ValidatorFactory).| Modifier and Type | Method and Description |
|---|---|
ConfigBuilder |
addFile(File file)
Add a file that should be loaded.
|
ConfigBuilder |
addFile(Path path)
Add a file that should be loaded.
|
ConfigBuilder |
addFile(String path)
Add a file that should be loaded.
|
ConfigBuilder |
addStream(InputStream stream)
Add a stream that should be read.
|
Config |
build()
Create the configuration object.
|
ConfigBuilder |
withRoot(File root)
Set the root folder of the configuration.
|
ConfigBuilder |
withRoot(Path path)
Set the root folder of the configuration.
|
ConfigBuilder |
withRoot(String root)
Set the root folder of the configuration.
|
ConfigBuilder |
withSerializerCollection(SerializerCollection serializers)
Set the the
SerializerCollection to use when reading the
configuration files. |
ConfigBuilder |
withValidatorFactory(javax.validation.ValidatorFactory validation)
Set the
ValidatorFactory to use when validating loaded
configuration objects. |
ConfigBuilder withSerializerCollection(SerializerCollection serializers)
SerializerCollection to use when reading the
configuration files.serializers - ConfigBuilder withValidatorFactory(javax.validation.ValidatorFactory validation)
ValidatorFactory to use when validating loaded
configuration objects.validation - ConfigBuilder withRoot(String root)
root - ConfigBuilder withRoot(Path path)
path - ConfigBuilder withRoot(File root)
root - ConfigBuilder addFile(String path)
path - ConfigBuilder addFile(Path path)
path - ConfigBuilder addFile(File file)
file - ConfigBuilder addStream(InputStream stream)
stream - Config build()
Copyright © 2017. All rights reserved.