com.lexicalscope.fluentreflection.bean
Class BeanMap
java.lang.Object
com.lexicalscope.fluentreflection.bean.BeanMap
public class BeanMap
- extends Object
Create a map by reflecting on bean properties
If you do not need the configurability of this class, consider using
net.sf.cglib.beans.BeanMap
instead for performance reasons.
- Author:
- Tim Wood
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanMap
public BeanMap()
map
public static Map<String,Object> map(Object bean)
- A map of the properties in the bean. Putting values into the map will
update the underlying bean. Getting write only properties will return
null. Setting read only properties is ignored.
Removing keys from the map (or any operation that implies removing one or
more keys) is not supported.
- Parameters:
bean
- the bean to expose as a map
- Returns:
- the bean wrapped in a map
beanMap
public static BeanMapBuilder beanMap()
onlyReadWriteProperties
public static BeanMap.KeySetCalculation onlyReadWriteProperties()
allReadableProperties
public static BeanMap.KeySetCalculation allReadableProperties()
allWriteableProperties
public static BeanMap.KeySetCalculation allWriteableProperties()
writeablePropertiesOnly
public static BeanMap.KeySetCalculation writeablePropertiesOnly()
readablePropertiesOnly
public static BeanMap.KeySetCalculation readablePropertiesOnly()
allProperties
public static BeanMap.KeySetCalculation allProperties()
lowercasePropertyName
public static BeanMap.PropertyNameConvertor lowercasePropertyName()
Copyright © 2011-2012 lexicalscope. All Rights Reserved.