public class BeanPopulator extends Object
| Constructor and Description |
|---|
BeanPopulator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configureFromProperties(Object bean,
Properties properties) |
static void |
configureFromProperties(Object bean,
String instanceName,
Properties properties)
Examine the properties of the provided bean and update them to match the values of the corresponding
properties in the Properties.
|
static <T> T |
getDefaultInstance(Class<T> beanClass) |
static <T> T |
getDefaultInstance(Class<T> beanClass,
Properties properties)
Deprecated.
|
static <T> T |
getNamedInstance(Class<T> beanClass,
String name) |
static String |
printBean(Object bean) |
static String |
printState()
Render the state of the known bean instances as text.
|
public static <T> T getDefaultInstance(Class<T> beanClass) throws RuntimeException
RuntimeException@Deprecated public static <T> T getDefaultInstance(Class<T> beanClass, Properties properties) throws RuntimeException
RuntimeExceptionpublic static <T> T getNamedInstance(Class<T> beanClass, String name) throws RuntimeException
RuntimeExceptionpublic static void configureFromProperties(Object bean, Properties properties) throws Exception
Exceptionpublic static void configureFromProperties(Object bean, String instanceName, Properties properties) throws Exception
bean - a JavaBean, the target of the property updates and source for defaults.instanceName - the (optional, use null for default) name for the bean instance.properties - a Properties object, the source of the configuration overrides.Exception - if the configuration of the bean fails.public static String printState()
Copyright © 2013. All rights reserved.