public class BeanSupport extends Object
| Modifier and Type | Field and Description |
|---|---|
static BeanSupport |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
protected |
BeanSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyName(Class<?> beanClass,
String propertyName,
String propertyEventName)
Adds the mapping for the specified property.
|
protected void |
collectForbiddenCopies(Set<String> rc,
Class<?> clazz)
Collects the
NoCopy properties (self-recursive). |
protected void |
collectTransientProperties(List<String> rc,
Class<?> clazz)
Collects the non-transient properties (self-recursive).
|
void |
firePropertyEvents(Collection<PropertyChangeListener> listeners,
Object bean)
Fires property change events to the listeners for the given bean.
|
protected Set<String> |
getForbiddenList(Class<?> beanClass,
boolean create)
Returns the set of property names forbidden to be copied.
|
List<String> |
getNonTransientProperties(Object bean)
Returns the non-transient properties of the bean or class.
|
Map<String,String> |
getPropertyMap(Class<?> beanClass)
Returns the map for the bean class.
|
List<String> |
getTransientProperties(Object bean)
Returns the transient properties of the bean or class.
|
boolean |
isCopyForbidden(Class<?> beanClass,
String propertyName)
Returns whether the given property is forbidden to be copied.
|
boolean |
isTransient(Object bean,
String propertyName)
Returns true when the given property is transient.
|
public static BeanSupport INSTANCE
public void addPropertyName(Class<?> beanClass, String propertyName, String propertyEventName)
beanClass - the class where the property occurspropertyName - the name of the bean propertypropertyEventName - the name to appear in change eventspublic Map<String,String> getPropertyMap(Class<?> beanClass)
beanClass - the class of the beanpublic void firePropertyEvents(Collection<PropertyChangeListener> listeners, Object bean)
listeners - listenersbean - beanpublic boolean isCopyForbidden(Class<?> beanClass, String propertyName)
NoCopy or is isTransient(Object, String).beanClass - the bean classpropertyName - the name of the propertytrue when IBean.copyTo(Object) must not copy this propertyprotected Set<String> getForbiddenList(Class<?> beanClass, boolean create)
beanClass - the classcreate - whether the list shall be created if it doesn't exist yetprotected void collectForbiddenCopies(Set<String> rc, Class<?> clazz)
NoCopy properties (self-recursive).rc - collection where properties need to be collectedclazz - class to be inspectedLangUtils.isNoCopy(PropertyDescriptor)public boolean isTransient(Object bean, String propertyName)
LangUtils.isTransient(PropertyDescriptor).bean - Bean or class of beanpropertyName - name of propertypublic List<String> getTransientProperties(Object bean)
bean - bean or class of beanisTransient(Object, String)public List<String> getNonTransientProperties(Object bean)
bean - bean or class of beanisTransient(Object, String)protected void collectTransientProperties(List<String> rc, Class<?> clazz)
rc - collection where properties need to be collectedclazz - class to be inspectedisTransient(Object, String)Copyright © 2014. All rights reserved.