Package org.jfree.xml.factory.objects
Class CollectionObjectDescription
java.lang.Object
org.jfree.xml.factory.objects.AbstractObjectDescription
org.jfree.xml.factory.objects.CollectionObjectDescription
- All Implemented Interfaces:
Serializable
,Cloneable
,ObjectDescription
An object description for simple collection objects, like java.util.List
or java.util.Set.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a list object description for the given collection class. -
Method Summary
Modifier and TypeMethodDescriptionCreates an object based on the description.getParameterDefinition
(String name) Returns a parameter definition.Returns an iterator for the parameter names.void
Sets the parameters of this description object to match the supplied object.Methods inherited from class org.jfree.xml.factory.objects.AbstractObjectDescription
configure, convertPrimitiveClass, equals, getConfig, getDefinedParameterNames, getInstance, getObjectClass, getParameter, getUnconfiguredInstance, hashCode, setParameter, setParameterDefinition
-
Constructor Details
-
CollectionObjectDescription
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 Details
-
getParameterDefinition
Returns a parameter definition. If the parameter is invalid, this function returns null.- Specified by:
getParameterDefinition
in interfaceObjectDescription
- Overrides:
getParameterDefinition
in classAbstractObjectDescription
- Parameters:
name
- the definition name.- Returns:
- The parameter class or null, if the parameter is not defined.
-
getParameterNames
Returns an iterator for the parameter names.- Specified by:
getParameterNames
in interfaceObjectDescription
- Overrides:
getParameterNames
in classAbstractObjectDescription
- Returns:
- The iterator.
-
createObject
Creates an object based on the description.- Returns:
- The object.
-
setParameterFromObject
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.
-