Class PropertyDescriptorBuilder


  • public final class PropertyDescriptorBuilder
    extends java.lang.Object
    Builds up PropertyDescriptor instance using various options.
    • Method Detail

      • createPropertyBuilder

        public static PropertyDescriptorBuilder createPropertyBuilder​(java.lang.String propertyName,
                                                                      java.lang.Class<?> beanClass)
                                                               throws java.beans.IntrospectionException
        Creates new PropertyDescriptorBuilder for non-boolean read-write properties.
        Parameters:
        propertyName - The programmatic name of the property.
        beanClass - The Class object for the target bean.
        Returns:
        new PropertyDescriptorBuilder instance.
        Throws:
        java.beans.IntrospectionException - if an exception occurs during introspection
      • createReadOnlyPropertyBuilder

        public static PropertyDescriptorBuilder createReadOnlyPropertyBuilder​(java.lang.String propertyName,
                                                                              java.lang.Class<?> beanClass)
                                                                       throws java.beans.IntrospectionException
        Creates new PropertyDescriptorBuilder for non-boolean read-only properties. Resulting property will not be editable. No setter method is needed.
        Parameters:
        propertyName - The programmatic name of the property.
        beanClass - The Class object for the target bean.
        Returns:
        new PropertyDescriptorBuilder instance.
        Throws:
        java.beans.IntrospectionException - if an exception occurs during introspection
      • createBooleanPropertyBuilder

        public static PropertyDescriptorBuilder createBooleanPropertyBuilder​(java.lang.String propertyName,
                                                                             java.lang.Class<?> beanClass)
                                                                      throws java.beans.IntrospectionException
        Creates new PropertyDescriptorBuilder for boolean read-write properties. Resulting property is boolean. In this case getter method must have prefix is .
        Parameters:
        propertyName - The programmatic name of the property.
        beanClass - The Class object for the target bean.
        Returns:
        new PropertyDescriptorBuilder instance.
        Throws:
        java.beans.IntrospectionException - if an exception occurs during introspection
      • createBooleanReadOnlyPropertyBuilder

        public static PropertyDescriptorBuilder createBooleanReadOnlyPropertyBuilder​(java.lang.String propertyName,
                                                                                     java.lang.Class<?> beanClass)
                                                                              throws java.beans.IntrospectionException
        Creates new PropertyDescriptorBuilder for boolean read-only properties. Resulting property is boolean. In this case getter method must have prefix is . Resulting property is not editable. No setter method is needed..
        Parameters:
        propertyName - The programmatic name of the property.
        beanClass - The Class object for the target bean.
        Returns:
        new PropertyDescriptorBuilder instance.
        Throws:
        java.beans.IntrospectionException - if an exception occurs during introspection
      • setLocalized

        public void setLocalized​(boolean localized)
      • setHidden

        public void setHidden​(boolean hidden)
        The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
        Parameters:
        hidden - True if this feature should be hidden from human users.
      • getResult

        public java.beans.PropertyDescriptor getResult()
        Gets constructed PropertyDescriptor.
        Returns:
        PropertyDescriptor instance