Binder
A container object which Binds objects from one or more ConfigurationPropertySources.
Author
Phillip Webb
Madhura Bhave
Since
2.0.0
Constructors
Link copied to clipboard
Create a new Binder instance for the specified sources.
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver)
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver, conversionService: ConversionService)
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver, conversionService: ConversionService, propertyEditorInitializer: Consumer<PropertyEditorRegistry>)
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver, conversionService: ConversionService, propertyEditorInitializer: Consumer<PropertyEditorRegistry>, defaultBindHandler: BindHandler)
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver, conversionService: ConversionService, propertyEditorInitializer: Consumer<PropertyEditorRegistry>, defaultBindHandler: BindHandler, constructorProvider: BindConstructorProvider)
Create a new Binder instance for the specified sources.
constructor(sources: Iterable<ConfigurationPropertySource>, placeholdersResolver: PlaceholdersResolver, conversionServices: List<ConversionService>, propertyEditorInitializer: Consumer<PropertyEditorRegistry>, defaultBindHandler: BindHandler, constructorProvider: BindConstructorProvider)
Create a new Binder instance for the specified sources.
Functions
Link copied to clipboard
Bind the specified target Class using this binder's property sources.
open fun <T> bind(name: ConfigurationPropertyName, target: Bindable<T>, handler: BindHandler): BindResult<T>
Bind the specified target Bindable using this binder's property sources.
Link copied to clipboard
Bind the specified target Class using this binder's property sources or create a new instance of the specified target Class if the result of the binding is
null
.open fun <T> bindOrCreate(name: ConfigurationPropertyName, target: Bindable<T>, handler: BindHandler): T
Bind the specified target Bindable using this binder's property sources or create a new instance using the type of the Bindable if the result of the binding is
null
.Link copied to clipboard
Create a new Binder instance from the specified environment.