Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jfree.xml.util.GenericObjectFactory
public final class GenericObjectFactory
extends java.lang.Object
Constructor Summary | |
|
Method Summary | |
Object |
|
AttributeDefinition[] |
|
Class |
|
ConstructorDefinition[] |
|
GenericObjectFactory |
|
LookupDefinition[] |
|
String[] |
|
Object |
|
PropertyDefinition |
|
PropertyDefinition |
|
PropertyDefinition[] |
|
String |
|
Class |
|
boolean |
|
void |
|
void |
|
void |
|
public GenericObjectFactory(Class c, String registerName, ConstructorDefinition[] constructors, PropertyDefinition[] propertyDefinitions, LookupDefinition[] lookupDefinitions, AttributeDefinition[] attributeDefinitions, String[] orderedPropertyNames) throws ObjectDescriptionException
Creates a new generic object factory.
- Parameters:
c
- the class.registerName
- the (optional) name under which to register the class for any later lookup.constructors
- the constructor definitions.propertyDefinitions
- the property definitions.lookupDefinitions
- the lookup definitions.attributeDefinitions
- the attribute definitions.orderedPropertyNames
- the ordered property names.
- Throws:
ObjectDescriptionException
- if there is a problem.
public Object createObject() throws ObjectDescriptionException
Creates an object according to the definition.
- Returns:
- the object.
- Throws:
ObjectDescriptionException
- if there is a problem with the object description.
public AttributeDefinition[] getAttributeDefinitions()
Returns the attribute definitions.
- Returns:
- the attribute definitions.
public ConstructorDefinition[] getConstructorDefinitions()
Returns the constructor definitions.
- Returns:
- the constructor definitions.
public GenericObjectFactory getInstance()
Returns a copy of this instance.
- Returns:
- a copy of this instance.
public LookupDefinition[] getLookupDefinitions()
Returns the lookup definitions.
- Returns:
- the lookup definitions.
public String[] getOrderedPropertyNames()
Returns the property names.
- Returns:
- the property names.
public Object getProperty(String name)
Returns the value of the specified property.
- Parameters:
name
- the property name.
- Returns:
- the property value.
public PropertyDefinition getPropertyDefinitionByPropertyName(String propertyName) throws ObjectDescriptionException
Returns the property definition for the specified property name.
- Parameters:
propertyName
- the property name.
- Returns:
- the property definition.
- Throws:
ObjectDescriptionException
- if there is no such property for this object.
public PropertyDefinition getPropertyDefinitionByTagName(String tagName) throws ObjectDescriptionException
Returns a property definition for the specified tag name.
- Parameters:
tagName
- the tag name.
- Returns:
- the property definition.
- Throws:
ObjectDescriptionException
- if there is no such tag defined for this object.
public PropertyDefinition[] getPropertyDefinitions()
Returns the property definitions.
- Returns:
- the property definitions.
public String getRegisterName()
Returns the register name.
- Returns:
- the register name.
public Class getTypeForTagName(String tagName) throws ObjectDescriptionException
Returns the class for a tag name.
- Parameters:
tagName
- the tag name.
- Returns:
- the class.
- Throws:
ObjectDescriptionException
- if there is a problem.
public boolean isPropertyDefinition(String propertyName)
Returns true if there is a property definition for the specified property name.
- Parameters:
propertyName
- the property name.
- Returns:
- A boolean.
public void readProperties(Object object) throws ObjectDescriptionException
Reads the properties.
- Parameters:
object
- the object.
- Throws:
ObjectDescriptionException
- if there is a problem.
public void setProperty(String propertyName, Object value) throws ObjectDescriptionException
Sets a property value.
- Parameters:
propertyName
- the property name.value
- the property value.
- Throws:
ObjectDescriptionException
- if there is a problem with the object description.
public void writeObjectProperties(Object object) throws ObjectDescriptionException
Writes the properties for the object.
- Parameters:
object
- the object.
- Throws:
ObjectDescriptionException
- if there is a problem.