Package org.jfree.xml.factory.objects
Class ArrayObjectDescription
java.lang.Object
org.jfree.xml.factory.objects.AbstractObjectDescription
org.jfree.xml.factory.objects.ArrayObjectDescription
- All Implemented Interfaces:
Serializable
,Cloneable
,ObjectDescription
Describes an Object- or primitive value array. This object description is
not intended to be created outside the ArrayClassFactory.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new array objet description for the given array class. -
Method Summary
Modifier and TypeMethodDescriptionCreates an object based on the description.Returns a new instance of the object description.getParameterDefinition
(String name) Returns a parameter definition.Returns an iterator for the parameter names.private int
parseParameterName
(String name) Tries to parse the given parameter string into a positive integer.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, getObjectClass, getParameter, getUnconfiguredInstance, hashCode, setParameter, setParameterDefinition
-
Constructor Details
-
ArrayObjectDescription
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 Details
-
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.
-
parseParameterName
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
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.
-
getInstance
Returns a new instance of the object description.- Specified by:
getInstance
in interfaceObjectDescription
- Overrides:
getInstance
in classAbstractObjectDescription
- Returns:
- The object description.
-