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:
java.io.Serializable,java.lang.Cloneable,ObjectDescription
public class CollectionObjectDescription extends AbstractObjectDescription
An object description for simple collection objects, like java.util.List or java.util.Set.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionObjectDescription(java.lang.Class c)Creates a list object description for the given collection class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcreateObject()Creates an object based on the description.java.lang.ClassgetParameterDefinition(java.lang.String name)Returns a parameter definition.java.util.IteratorgetParameterNames()Returns an iterator for the parameter names.voidsetParameterFromObject(java.lang.Object o)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 Detail
-
CollectionObjectDescription
public CollectionObjectDescription(java.lang.Class c)
Creates a list object description for the given collection class.Throws
ClassCastExceptionif the given class is no collection instance.- Parameters:
c- the class of the collection implementation.
-
-
Method Detail
-
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:
getParameterDefinitionin interfaceObjectDescription- Overrides:
getParameterDefinitionin classAbstractObjectDescription- Parameters:
name- the definition name.- Returns:
- The parameter class or null, if the parameter is not defined.
-
getParameterNames
public java.util.Iterator getParameterNames()
Returns an iterator for the parameter names.- Specified by:
getParameterNamesin interfaceObjectDescription- Overrides:
getParameterNamesin classAbstractObjectDescription- Returns:
- The iterator.
-
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.
-
-