org.jfree.xml.factory.objects

Class ArrayObjectDescription

public class ArrayObjectDescription extends AbstractObjectDescription

Describes an Object- or primitive value array. This object description is not intended to be created outside the ArrayClassFactory.

Author: Thomas Morgner

Constructor Summary
ArrayObjectDescription(Class c)
Constructs a new array objet description for the given array class.
Method Summary
ObjectcreateObject()
Creates an object based on the description.
ObjectDescriptiongetInstance()
Returns a new instance of the object description.
ClassgetParameterDefinition(String name)
Returns a parameter definition.
IteratorgetParameterNames()
Returns an iterator for the parameter names.
voidsetParameterFromObject(Object o)
Sets the parameters of this description object to match the supplied object.

Constructor Detail

ArrayObjectDescription

public ArrayObjectDescription(Class c)
Constructs a new array objet description for the given array class.

Note: throws IllegalArgumentException if the given class is no array.

Parameters: c the array class object.

Method Detail

createObject

public Object createObject()
Creates an object based on the description.

Returns: The object.

getInstance

public ObjectDescription getInstance()
Returns a new instance of the object description.

Returns: The object description.

getParameterDefinition

public Class getParameterDefinition(String name)
Returns a parameter definition. If the parameter is invalid, this function returns null.

Parameters: name the definition name.

Returns: The parameter class or null, if the parameter is not defined.

getParameterNames

public Iterator getParameterNames()
Returns an iterator for the parameter names.

Returns: The iterator.

setParameterFromObject

public void setParameterFromObject(Object o)
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.