public interface ObjectDescription extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration config)
Configures this factory.
|
java.lang.Object |
createObject()
Creates an object based on the description.
|
boolean |
equals(java.lang.Object o)
Compares whether two object descriptions are equal.
|
ObjectDescription |
getInstance()
Returns a cloned instance of the object description.
|
java.lang.Class |
getObjectClass()
Returns the object class.
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the value of a parameter.
|
java.lang.Class |
getParameterDefinition(java.lang.String name)
Returns a parameter definition.
|
java.util.Iterator |
getParameterNames()
Returns an iterator the provides access to the parameter names.
|
ObjectDescription |
getUnconfiguredInstance()
Returns a cloned instance of the object description.
|
int |
hashCode()
Computes the hashCode for this ClassFactory.
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the value of a parameter.
|
void |
setParameterFromObject(java.lang.Object o)
Sets the parameters of this description object to match the supplied object.
|
java.lang.Class getParameterDefinition(java.lang.String name)
name
- the definition name.void setParameter(java.lang.String name, java.lang.Object value)
name
- the parameter name.value
- the parameter value.java.lang.Object getParameter(java.lang.String name)
name
- the parameter name.java.util.Iterator getParameterNames()
java.lang.Class getObjectClass()
java.lang.Object createObject()
ObjectDescription getUnconfiguredInstance()
Parameter definitions are not cloned, as they are considered read-only.
The newly instantiated object description is not configured. If it need to be configured, then you have to call configure on it.
ObjectDescription getInstance()
Parameter definitions are not cloned, as they are considered read-only.
void setParameterFromObject(java.lang.Object o) throws ObjectFactoryException
o
- the object.ObjectFactoryException
- if there is a problem while reading the
properties of the given object.void configure(Configuration config)
The configuration contents may change during the reporting.
config
- the configuration, never nullboolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other object.int hashCode()
hashCode
in class java.lang.Object