public class BeanWrapperContext extends Object
Performs introspection and holds metadata information about a class used by the BeanWrapper.
If you have to create several BeanWrappers for the same java class, use this and save the introspection overhead.
This class is thread safe.
| Constructor and Description |
|---|
BeanWrapperContext(Class clazz) |
BeanWrapperContext(Class clazz,
Type... types) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getBeanClass()
Get the wrapped bean class
|
BeanContextCreator<? extends BeanWrapperContext> |
getBeanContextCreator() |
BeanFieldHandler |
getBeanFieldHandler(String propertyName) |
Map<String,BeanFieldHandler> |
getFields() |
Map<String,BeanWrapper> |
getNestedWrappers()
Returns all the nested bean wrappers that have been created inside this bean wrapper.
Nested bean wrappers are created when you access a nested property (i.e. |
Map<TypeVariable<?>,Type> |
getTypeArgumentsMap() |
boolean |
isEagerInstatiation() |
Object |
newBeanInstance() |
void |
setBeanContextCreator(BeanContextCreator<? extends BeanWrapperContext> beanContextCreator) |
void |
setBeanInstanceCreator(BeanInstanceCreator beanInstanceCreator)
The bean wrapper creates new instances using Class.newIntance().
|
void |
setEagerInstatiation(boolean eager)
Defines when a new instance is created.
If eager is true, a new instance is created when the BeanWrapper is created and reset. |
public BeanWrapperContext(Class clazz)
public BeanFieldHandler getBeanFieldHandler(String propertyName)
public Class<?> getBeanClass()
public Object newBeanInstance()
public Map<String,BeanWrapper> getNestedWrappers()
public Map<String,BeanFieldHandler> getFields()
public Map<TypeVariable<?>,Type> getTypeArgumentsMap()
public void setBeanInstanceCreator(BeanInstanceCreator beanInstanceCreator)
beanInstanceCreator - public BeanContextCreator<? extends BeanWrapperContext> getBeanContextCreator()
public void setBeanContextCreator(BeanContextCreator<? extends BeanWrapperContext> beanContextCreator)
public boolean isEagerInstatiation()
public void setEagerInstatiation(boolean eager)
eagerInstatiation - Copyright © 2011-2013. All Rights Reserved.