public class Binder extends Object
ConfigurationPropertySources.| Constructor and Description | 
|---|
| Binder(ConfigurationPropertySource... sources)Create a new  Binderinstance for the specified sources. | 
| Binder(Iterable<ConfigurationPropertySource> sources)Create a new  Binderinstance for the specified sources. | 
| Binder(Iterable<ConfigurationPropertySource> sources,
      PlaceholdersResolver placeholdersResolver)Create a new  Binderinstance for the specified sources. | 
| Binder(Iterable<ConfigurationPropertySource> sources,
      PlaceholdersResolver placeholdersResolver,
      org.springframework.core.convert.ConversionService conversionService)Create a new  Binderinstance for the specified sources. | 
| Binder(Iterable<ConfigurationPropertySource> sources,
      PlaceholdersResolver placeholdersResolver,
      org.springframework.core.convert.ConversionService conversionService,
      Consumer<org.springframework.beans.PropertyEditorRegistry> propertyEditorInitializer)Create a new  Binderinstance for the specified sources. | 
| Modifier and Type | Method and Description | 
|---|---|
| <T> BindResult<T> | bind(ConfigurationPropertyName name,
    Bindable<T> target)Bind the specified target  Bindableusing this binder'sproperty sources. | 
| <T> BindResult<T> | bind(ConfigurationPropertyName name,
    Bindable<T> target,
    BindHandler handler)Bind the specified target  Bindableusing this binder'sproperty sources. | 
| <T> BindResult<T> | bind(String name,
    Bindable<T> target)Bind the specified target  Bindableusing this binder'sproperty sources. | 
| <T> BindResult<T> | bind(String name,
    Bindable<T> target,
    BindHandler handler)Bind the specified target  Bindableusing this binder'sproperty sources. | 
| <T> BindResult<T> | bind(String name,
    Class<T> target)Bind the specified target  Classusing this binder'sproperty sources. | 
| <T> T | bindOrCreate(ConfigurationPropertyName name,
            Bindable<T> target,
            BindHandler handler)Bind the specified target  Bindableusing this binder'sproperty sourcesor create a new instance using
 the type of theBindableif the result of the binding isnull. | 
| <T> T | bindOrCreate(String name,
            Bindable<T> target)Bind the specified target  Bindableusing this binder'sproperty sourcesor create a new instance using
 the type of theBindableif the result of the binding isnull. | 
| <T> T | bindOrCreate(String name,
            Bindable<T> target,
            BindHandler handler)Bind the specified target  Bindableusing this binder'sproperty sourcesor create a new instance using
 the type of theBindableif the result of the binding isnull. | 
| <T> T | bindOrCreate(String name,
            Class<T> target)Bind the specified target  Classusing this binder'sproperty sourcesor create a new instance using
 the type of theBindableif the result of the binding isnull. | 
| static Binder | get(org.springframework.core.env.Environment environment)Create a new  Binderinstance from the specified environment. | 
public Binder(ConfigurationPropertySource... sources)
Binder instance for the specified sources. A
 DefaultFormattingConversionService will be used for all conversion.sources - the sources used for bindingpublic Binder(Iterable<ConfigurationPropertySource> sources)
Binder instance for the specified sources. A
 DefaultFormattingConversionService will be used for all conversion.sources - the sources used for bindingpublic Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver)
Binder instance for the specified sources.sources - the sources used for bindingplaceholdersResolver - strategy to resolve any property placeholderspublic Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, org.springframework.core.convert.ConversionService conversionService)
Binder instance for the specified sources.sources - the sources used for bindingplaceholdersResolver - strategy to resolve any property placeholdersconversionService - the conversion service to convert values (or null
 to use ApplicationConversionService)public Binder(Iterable<ConfigurationPropertySource> sources, PlaceholdersResolver placeholdersResolver, org.springframework.core.convert.ConversionService conversionService, Consumer<org.springframework.beans.PropertyEditorRegistry> propertyEditorInitializer)
Binder instance for the specified sources.sources - the sources used for bindingplaceholdersResolver - strategy to resolve any property placeholdersconversionService - the conversion service to convert values (or null
 to use ApplicationConversionService)propertyEditorInitializer - initializer used to configure the property editors
 that can convert values (or null if no initialization is required). Often
 used to call ConfigurableBeanFactory.copyRegisteredEditorsTo(org.springframework.beans.PropertyEditorRegistry).public <T> BindResult<T> bind(String name, Class<T> target)
Class using this binder's
 property sources.T - the bound typename - the configuration property name to bindtarget - the target classnull)bind(ConfigurationPropertyName, Bindable, BindHandler)public <T> BindResult<T> bind(String name, Bindable<T> target)
Bindable using this binder's
 property sources.T - the bound typename - the configuration property name to bindtarget - the target bindablenull)bind(ConfigurationPropertyName, Bindable, BindHandler)public <T> BindResult<T> bind(ConfigurationPropertyName name, Bindable<T> target)
Bindable using this binder's
 property sources.T - the bound typename - the configuration property name to bindtarget - the target bindablenull)bind(ConfigurationPropertyName, Bindable, BindHandler)public <T> BindResult<T> bind(String name, Bindable<T> target, BindHandler handler)
Bindable using this binder's
 property sources.T - the bound typename - the configuration property name to bindtarget - the target bindablehandler - the bind handler (may be null)null)public <T> BindResult<T> bind(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler)
Bindable using this binder's
 property sources.T - the bound typename - the configuration property name to bindtarget - the target bindablehandler - the bind handler (may be null)null)public <T> T bindOrCreate(String name, Class<T> target)
Class 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.T - the bound typename - the configuration property name to bindtarget - the target classbind(ConfigurationPropertyName, Bindable, BindHandler)public <T> T bindOrCreate(String name, Bindable<T> 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.T - the bound typename - the configuration property name to bindtarget - the target bindablebindOrCreate(ConfigurationPropertyName, Bindable, BindHandler)public <T> T bindOrCreate(String name, Bindable<T> target, BindHandler handler)
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.T - the bound typename - the configuration property name to bindtarget - the target bindablehandler - the bind handlerbindOrCreate(ConfigurationPropertyName, Bindable, BindHandler)public <T> T bindOrCreate(ConfigurationPropertyName name, Bindable<T> target, BindHandler handler)
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.T - the bound or created typename - the configuration property name to bindtarget - the target bindablehandler - the bind handler (may be null)public static Binder get(org.springframework.core.env.Environment environment)
Binder instance from the specified environment.environment - the environment source (must have attached
 ConfigurationPropertySources)Binder instanceCopyright © 2019 Pivotal Software, Inc.. All rights reserved.