Class BeanProvider

    • Field Detail

      • NO_PARAMS

        protected static final java.lang.Object[] NO_PARAMS
        Deprecated.
        As of 1.4.6
    • Constructor Detail

      • BeanProvider

        public BeanProvider()
        Construct a BeanProvider that will process the bean properties in their natural order.
      • BeanProvider

        public BeanProvider​(java.util.Comparator propertyNameComparator)
        Construct a BeanProvider with a comparator to sort the bean properties by name in the dictionary.
        Parameters:
        propertyNameComparator - the comparator
      • BeanProvider

        public BeanProvider​(PropertyDictionary propertyDictionary)
        Construct a BeanProvider with a provided property dictionary.
        Parameters:
        propertyDictionary - the property dictionary to use
        Since:
        1.4
    • Method Detail

      • newInstance

        public java.lang.Object newInstance​(java.lang.Class type)
        Specified by:
        newInstance in interface JavaBeanProvider
      • writeProperty

        public void writeProperty​(java.lang.Object object,
                                  java.lang.String propertyName,
                                  java.lang.Object value)
        Specified by:
        writeProperty in interface JavaBeanProvider
      • getPropertyType

        public java.lang.Class getPropertyType​(java.lang.Object object,
                                               java.lang.String name)
        Specified by:
        getPropertyType in interface JavaBeanProvider
      • canInstantiate

        public boolean canInstantiate​(java.lang.Class type)
        Returns true if the Bean provider can instantiate the specified class
        Specified by:
        canInstantiate in interface JavaBeanProvider
      • getDefaultConstrutor

        protected java.lang.reflect.Constructor getDefaultConstrutor​(java.lang.Class type)
        Deprecated.
        As of 1.4.6 use newInstance(Class) or canInstantiate(Class) directly.
        Returns the default constructor, or null if none is found
        Parameters:
        type -
      • getSerializableProperties

        protected java.beans.PropertyDescriptor[] getSerializableProperties​(java.lang.Object object)
      • canStreamProperty

        protected boolean canStreamProperty​(java.beans.PropertyDescriptor descriptor)
      • propertyWriteable

        public boolean propertyWriteable​(java.lang.String name,
                                         java.lang.Class type)
      • getProperty

        protected java.beans.PropertyDescriptor getProperty​(java.lang.String name,
                                                            java.lang.Class type)