public final class ConfigTreeBuilder
extends java.lang.Object
Use jackson serialization api for configuration introspection. This way everything that is accessible for jackson serialization will be extracted. Jackson will perform all required reflection work and cache it during configuration mapping, so performance should not be harmed at all.
Extra generics information is extracted with GenericsResolver to use all possibly available types
information in bindings.
To prevent too deep paths:
Common collection types are projected to base interfaces. E.g. even if property declaration would be
ArrayList<String>, binding declaration would be List<String> (but value type will remain
ArrayList<String> even if no value available).
| Modifier and Type | Method and Description |
|---|---|
static ConfigurationTree |
build(io.dropwizard.setup.Bootstrap bootstrap,
io.dropwizard.Configuration configuration)
Shortcut for
build(Bootstrap, Configuration, boolean) with enabled introspection. |
static ConfigurationTree |
build(io.dropwizard.setup.Bootstrap bootstrap,
io.dropwizard.Configuration configuration,
boolean introspect)
Analyze configuration object to extract bindable parts.
|
public static ConfigurationTree build(io.dropwizard.setup.Bootstrap bootstrap, io.dropwizard.Configuration configuration)
build(Bootstrap, Configuration, boolean) with enabled introspection.bootstrap - bootstrap instanceconfiguration - configuration instancepublic static ConfigurationTree build(io.dropwizard.setup.Bootstrap bootstrap, io.dropwizard.Configuration configuration, boolean introspect)
bootstrap - bootstrap instanceconfiguration - configuration instanceintrospect - true to introspect configuration object and extract values by path and unique
sub configurations