public class ConfigProxyFactory
extends java.lang.Object
PropertyFactory
instance. Getter methods on the interface are mapped by naming convention
by the property name or may be overridden using the @PropertyName annotation.
For example,
{@codeConfiguration| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ConfigProxyFactory.PropertyValueGetter<T>
Encapsulate the invocation of a single method of the interface
|
| Constructor and Description |
|---|
ConfigProxyFactory(com.netflix.archaius.api.Config config)
Deprecated.
|
ConfigProxyFactory(com.netflix.archaius.api.Config config,
com.netflix.archaius.api.Decoder decoder,
com.netflix.archaius.api.PropertyFactory factory)
Build a proxy factory from the provided config, decoder and PropertyFactory.
|
ConfigProxyFactory(com.netflix.archaius.api.Config config,
com.netflix.archaius.api.PropertyFactory factory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> ConfigProxyFactory.PropertyValueGetter<T> |
createInterfaceProperty(java.lang.String propName,
T proxy)
A value getter for a nested Config proxy
|
protected <T> ConfigProxyFactory.PropertyValueGetter<T> |
createParameterizedProperty(java.lang.reflect.Type returnType,
java.lang.String propertyNameTemplate,
java.util.function.Function<java.lang.Object[],T> defaultValueSupplier)
A value getter for a parameterized property.
|
protected <T> ConfigProxyFactory.PropertyValueGetter<T> |
createScalarProperty(java.lang.reflect.Type type,
java.lang.String propName,
java.util.function.Function<java.lang.Object[],T> defaultValueSupplier)
A value getter for a "simple" property.
|
<T> T |
newProxy(java.lang.Class<T> type)
Create a proxy for the provided interface type for which all getter methods are bound
to a Property.
|
<T> T |
newProxy(java.lang.Class<T> type,
java.lang.String initialPrefix)
Create a proxy for the provided interface type for which all getter methods are bound
to a Property.
|
@Inject
public ConfigProxyFactory(com.netflix.archaius.api.Config config,
com.netflix.archaius.api.Decoder decoder,
com.netflix.archaius.api.PropertyFactory factory)
config - Used to perform string interpolation in values from DefaultValue annotations. Weird things
will happen if this is not the same Config that the PropertyFactory exposes!decoder - Used to parse strings from DefaultValue annotations into the proper types.factory - Used to access the config values that are returned by proxies created by this factory.@Deprecated public ConfigProxyFactory(com.netflix.archaius.api.Config config)
The constructed factory will use the Config's Decoder and a DefaultPropertyFactory built from that same
Config object.
@Deprecated
public ConfigProxyFactory(com.netflix.archaius.api.Config config,
com.netflix.archaius.api.PropertyFactory factory)
public <T> T newProxy(java.lang.Class<T> type)
public <T> T newProxy(java.lang.Class<T> type,
java.lang.String initialPrefix)
Configuration annotation in TYPE.protected <T> ConfigProxyFactory.PropertyValueGetter<T> createInterfaceProperty(java.lang.String propName, T proxy)
protected <T> ConfigProxyFactory.PropertyValueGetter<T> createScalarProperty(java.lang.reflect.Type type, java.lang.String propName, java.util.function.Function<java.lang.Object[],T> defaultValueSupplier)
protected <T> ConfigProxyFactory.PropertyValueGetter<T> createParameterizedProperty(java.lang.reflect.Type returnType, java.lang.String propertyNameTemplate, java.util.function.Function<java.lang.Object[],T> defaultValueSupplier)