org.das2.beans.BeansUtil

Utilities for JavaBeans conventions, allowing custom editors to be used to edit JavaBeans with set/get properties.

BeansUtil( )


asAccessLevelBeanInfo

asAccessLevelBeanInfo( java.beans.BeanInfo beanInfo, java.lang.Class beanClass ) → org.das2.beans.AccessLevelBeanInfo

Returns an AccessLevelBeanInfo for the BeanInfo class, implementing the logic of how to handle implicit properties.

Parameters

beanInfo - a BeanInfo
beanClass - a java.lang.Class

Returns:

org.das2.beans.AccessLevelBeanInfo

[search for examples] [view on GitHub] [view on old javadoc] [view source]


findEditor

findEditor( java.lang.Class propertyClass ) → java.beans.PropertyEditor

Parameters

propertyClass - a java.lang.Class

Returns:

java.beans.PropertyEditor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getBeanInfo

getBeanInfo( java.lang.Class c ) → java.beans.BeanInfo

Parameters

c - a java.lang.Class

Returns:

java.beans.BeanInfo

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getEditor

getEditor( java.beans.PropertyDescriptor pd ) → java.beans.PropertyEditor

One-stop place to get the editor for the given propertyDescriptor.

Parameters

pd - the property descriptor

Returns:

the editor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPropertyDescriptors

getPropertyDescriptors( java.lang.Class c ) → java.beans.PropertyDescriptor[]

Use reflection to get a list of all the property names for the class. The properties are returned in the order specified, and put inherited properties at the end of the list. Implement the include/exclude logic. This will not return write-only descriptors!!!

Parameters

c - a java.lang.Class

Returns:

java.beans.PropertyDescriptor[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPropertyNames

getPropertyNames( java.beans.PropertyDescriptor[] propertyList ) → String[]

Parameters

propertyList - a java.beans.PropertyDescriptor[]

Returns:

java.lang.String[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]

getPropertyNames( java.lang.Class c ) → String[]

registerEditor

registerEditor( java.lang.Class beanClass, java.lang.Class editorClass ) → void

see BeanBindingDemo2.java

Parameters

beanClass - the bean class, e.g. Datum.class
editorClass - the editor class, e.g. DatumEditor.class

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]