Class PropertyContainer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,​java.lang.Object>

    public class PropertyContainer
    extends PropertyMap
    Provides helper methods for working with instance or class properties.
    Version:
    $Revision$
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The serialVersionUID
        See Also:
        Constant Field Values
      • groupname

        protected java.lang.String groupname
        The group name for this container.
    • Constructor Detail

      • PropertyContainer

        public PropertyContainer​(java.util.Properties props)
        Initialize the container with a property group.
        Parameters:
        props -
      • PropertyContainer

        public PropertyContainer​(java.lang.String groupname)
        Initialize the container with a property group of the given name.
        Parameters:
        groupname - Property group name.
      • PropertyContainer

        public PropertyContainer​(java.lang.Class<?> type)
        Initialize the container with a property group of the given class name.
        Parameters:
        type - The class whos name will be the property group name.
    • Method Detail

      • bindField

        protected void bindField​(java.lang.String name,
                                 java.lang.String propertyName)
        Creates a FieldBoundPropertyListener for the field and property name and adds it the underlying property group.
        Parameters:
        name - The field name to bind values to.
        propertyName - The property name to bind to.
        Throws:
        java.lang.IllegalArgumentException - Field of property name is null or empty.
      • bindField

        protected void bindField​(java.lang.String name)
        Creates a FieldBoundPropertyListener for the field and property name and adds it the underlying property group.
        Parameters:
        name - The field name and property to bind values to.
        Throws:
        java.lang.IllegalArgumentException - Field of property name is null or empty.
      • bindMethod

        protected void bindMethod​(java.lang.String name,
                                  java.lang.String propertyName)
        Creates a MethodBoundPropertyListener for the method and property name and adds it the underlying property group.
        Parameters:
        name - The method name to bind values to.
        propertyName - The property name to bind to.
        Throws:
        java.lang.IllegalArgumentException - Method of property name is null or empty.
      • bindMethod

        protected void bindMethod​(java.lang.String name)
        Creates a MethodBoundPropertyListener for the method and property name and adds it the underlying property group.
        Parameters:
        name - The method name and property to bind values to.
        Throws:
        java.lang.IllegalArgumentException - Method of property name is null or empty.
      • makeName

        private java.lang.String makeName​(java.lang.String name)
      • throwException

        protected void throwException​(java.lang.String name,
                                      java.lang.String msg,
                                      java.lang.Throwable nested)
                               throws PropertyException
        Throws:
        PropertyException