public class ValueLoaderSourceImpl extends Object implements ValueLoaderSource
ValueLoaderSource
implementation.Constructor and Description |
---|
ValueLoaderSourceImpl() |
Modifier and Type | Method and Description |
---|---|
static StatelessValueLoaderFactory[] |
createValueLoaderFactories(Class<?> type,
PropertyKeyFactory propertyKeyFactory,
ObjectInstantiator objectInstantiator,
Map<String,String> aliasMappings,
Map<Class<?>,StatelessValueLoaderFactory[]> factoriesByType)
Creates
StatelessValueLoaderFactory instances for the type. |
void |
init(Class<?> type,
boolean isCaseInsensitive,
Map<String,String> aliasMappings,
ObjectInstantiator objectInstantiator)
Initialise.
|
static void |
loadValue(Object object,
Method method,
Object... parameters)
Loads the value onto the object.
|
<T> ValueLoaderFactory<T> |
sourceValueLoaderFactory(Class<T> clazz)
Sources the
ValueLoaderFactory . |
public static void loadValue(Object object, Method method, Object... parameters) throws Exception
public static StatelessValueLoaderFactory[] createValueLoaderFactories(Class<?> type, PropertyKeyFactory propertyKeyFactory, ObjectInstantiator objectInstantiator, Map<String,String> aliasMappings, Map<Class<?>,StatelessValueLoaderFactory[]> factoriesByType) throws Exception
StatelessValueLoaderFactory
instances for the type.type
- Type to create StatelessValueLoaderFactory
instances.propertyKeyFactory
- PropertyKeyFactory
.objectInstantiator
- ObjectInstantiator
.aliasMappings
- Alias mappings.factoriesByType
- StatelessValueLoaderFactory
instances by type.StatelessValueLoaderFactory
instances for the type.Exception
- If fails to create the StatelessValueLoaderFactory
instances.public void init(Class<?> type, boolean isCaseInsensitive, Map<String,String> aliasMappings, ObjectInstantiator objectInstantiator) throws Exception
ValueLoaderSource
init
in interface ValueLoaderSource
type
- Type to interrogate for properties to be loaded.isCaseInsensitive
- Flag indicating if case sensitive matching.aliasMappings
- Alias Mappings.objectInstantiator
- ObjectInstantiator
.Exception
- If fails to initialise.public <T> ValueLoaderFactory<T> sourceValueLoaderFactory(Class<T> clazz) throws Exception
ValueLoaderSource
Sources the ValueLoaderFactory
.
The returned ValueLoaderFactory
is specific to the input
Class
. The ValueLoaderFactory
will not work with children
of the Class
. A new ValueLoaderFactory
must be created
for each child type.
sourceValueLoaderFactory
in interface ValueLoaderSource
T
- Class
type.clazz
- Class
for a dedicated ValueLoaderFactory
. It
is expected that all property methods on the type
are on this clazz
.ValueLoaderFactory
.Exception
- If fails to source the ValueLoaderFactory
.Copyright © 2005–2016. All rights reserved.