Class CollectionObjectDescription

    • Constructor Detail

      • CollectionObjectDescription

        public CollectionObjectDescription​(java.lang.Class c)
        Creates a list object description for the given collection class.

        Throws ClassCastException if the given class is no collection instance.

        Parameters:
        c - the class of the collection implementation.
    • Method Detail

      • parseParameterName

        private int parseParameterName​(java.lang.String name)
        Tries to parse the given parameter string into a positive integer. Returns -1 if the parsing failed for some reason.
        Parameters:
        name - the name of the parameter.
        Returns:
        the parsed int value or -1 on errors.
      • getParameterDefinition

        public java.lang.Class getParameterDefinition​(java.lang.String name)
        Returns a parameter definition. If the parameter is invalid, this function returns null.
        Specified by:
        getParameterDefinition in interface ObjectDescription
        Overrides:
        getParameterDefinition in class AbstractObjectDescription
        Parameters:
        name - the definition name.
        Returns:
        The parameter class or null, if the parameter is not defined.
      • createObject

        public java.lang.Object createObject()
        Creates an object based on the description.
        Returns:
        The object.
      • setParameterFromObject

        public void setParameterFromObject​(java.lang.Object o)
                                    throws ObjectFactoryException
        Sets the parameters of this description object to match the supplied object.
        Parameters:
        o - the object.
        Throws:
        ObjectFactoryException - if there is a problem while reading the properties of the given object.