Class BeanInfoSupport

  • All Implemented Interfaces:
    java.beans.BeanInfo

    
    public abstract class BeanInfoSupport
    extends SimpleBeanInfo
                        

    Support class for test bean beanInfo objects. It will help using the introspector to get most of the information, to then modify it at will.

    To use, subclass it, create a subclass with a parameter-less constructor that:

    • Calls super(beanClass)
    • Modifies the property descriptors, bean descriptor, etc. at will.

    Even before any such modifications, a resource bundle named xxxResources (where xxx is the fully qualified bean class name) will be obtained if available and used to localize the following:

    • Bean's display name -- from property displayName.
    • Properties' display names -- from properties propertyName.displayName.
    • Properties' short descriptions -- from properties propertyName.shortDescription.

    The resource bundle will be stored as the bean descriptor's "resourceBundle" attribute, so that it can be used for further localization. TestBeanGUI, for example, uses it to obtain the group's display names from properties groupName.displayName.