org.das2.beans
Class BeansUtil

java.lang.Object
  extended by org.das2.beans.BeansUtil

public class BeansUtil
extends java.lang.Object


Constructor Summary
BeansUtil()
           
 
Method Summary
static AccessLevelBeanInfo asAccessLevelBeanInfo(java.beans.BeanInfo beanInfo, java.lang.Class beanClass)
          Returns an AccessLevelBeanInfo for the BeanInfo class, implementing the logic of how to handle implicit properties.
static java.beans.PropertyEditor findEditor(java.lang.Class propertyClass)
           
static java.beans.BeanInfo getBeanInfo(java.lang.Class c)
           
static java.beans.PropertyEditor getEditor(java.beans.PropertyDescriptor pd)
          One-stop place to get the editor for the given propertyDescriptor.
static java.beans.PropertyDescriptor[] getPropertyDescriptors(java.lang.Class c)
          Use reflection to get a list of all the property names for the class.
static java.lang.String[] getPropertyNames(java.lang.Class c)
          Use reflection to get a list of all the property names for the class.
static java.lang.String[] getPropertyNames(java.beans.PropertyDescriptor[] propertyList)
           
static void registerEditor(java.lang.Class beanClass, java.lang.Class editorClass)
          see BeanBindingDemo2.java
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeansUtil

public BeansUtil()
Method Detail

registerEditor

public static void registerEditor(java.lang.Class beanClass,
                                  java.lang.Class editorClass)
see BeanBindingDemo2.java


findEditor

public static java.beans.PropertyEditor findEditor(java.lang.Class propertyClass)

getEditor

public static java.beans.PropertyEditor getEditor(java.beans.PropertyDescriptor pd)
One-stop place to get the editor for the given propertyDescriptor.


getPropertyDescriptors

public static java.beans.PropertyDescriptor[] getPropertyDescriptors(java.lang.Class c)
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.


getBeanInfo

public static java.beans.BeanInfo getBeanInfo(java.lang.Class c)
                                       throws java.beans.IntrospectionException
Throws:
java.beans.IntrospectionException

getPropertyNames

public static java.lang.String[] getPropertyNames(java.beans.PropertyDescriptor[] propertyList)

getPropertyNames

public static java.lang.String[] getPropertyNames(java.lang.Class c)
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. This is motivated by the arbitary order that the Introspector presents the properties, which is in conflict with our desire to control the property order.


asAccessLevelBeanInfo

public static AccessLevelBeanInfo asAccessLevelBeanInfo(java.beans.BeanInfo beanInfo,
                                                        java.lang.Class beanClass)
Returns an AccessLevelBeanInfo for the BeanInfo class, implementing the logic of how to handle implicit properties.