Class AbstractObjectDescription
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.AbstractObjectDescription
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ObjectDescription
- Direct Known Subclasses:
AlignmentObjectDescription
,ArrayObjectDescription
,BasicStrokeObjectDescription
,BeanObjectDescription
,BooleanObjectDescription
,BorderStyleObjectDescription
,BoxSizingObjectDescription
,ByteObjectDescription
,CharacterObjectDescription
,ClassLoaderObjectDescription
,CollectionObjectDescription
,ColorObjectDescription
,DateObjectDescription
,Dimension2DObjectDescription
,DimensionObjectDescription
,DoubleObjectDescription
,Ellipse2DObjectDescription
,FloatObjectDescription
,FontDefinitionObjectDescription
,FontSmoothObjectDescription
,GeneralPathObjectDescription
,IntegerObjectDescription
,Line2DObjectDescription
,LongObjectDescription
,PathIteratorSegmentObjectDescription
,Point2DObjectDescription
,Rectangle2DObjectDescription
,RoundRectangle2DObjectDescription
,ShortObjectDescription
,StringObjectDescription
,TextWrapObjectDescription
,TimeZoneObjectDescription
,URLObjectDescription
,VerticalAlignmentObjectDescription
,WhitespaceCollapseObjectDescription
public abstract class AbstractObjectDescription extends Object implements ObjectDescription, Cloneable
An abstract base class for object descriptions.- Author:
- Thomas Morgner.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractObjectDescription(Class className)
Creates a new object description.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
void
configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory.static Class
convertPrimitiveClass(Class obj)
Converts primitives to corresponding object class.boolean
equals(Object o)
Tests for equality.org.pentaho.reporting.libraries.base.config.Configuration
getConfig()
Returns the configuration for that object description.protected Iterator
getDefinedParameterNames()
Returns an iterator for the parameter names.ObjectDescription
getInstance()
Returns a cloned instance of the object description.Class
getObjectClass()
Returns the class for the object.Object
getParameter(String name)
Returns a parameter value.Class
getParameterDefinition(String name)
Returns a parameter class.Iterator
getParameterNames()
Returns an iterator for the parameter names.ObjectDescription
getUnconfiguredInstance()
Returns a cloned instance of the object description.int
hashCode()
Returns a hash code for the object.void
setParameter(String name, Object value)
Sets a parameter.void
setParameterDefinition(String name, Class obj)
Sets the class for a parameter.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription
createObject, setParameterFromObject
-
-
-
-
Constructor Detail
-
AbstractObjectDescription
protected AbstractObjectDescription(Class className)
Creates a new object description.- Parameters:
className
- the class.
-
-
Method Detail
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getParameterDefinition
public Class getParameterDefinition(String name)
Returns a parameter class.- Specified by:
getParameterDefinition
in interfaceObjectDescription
- Parameters:
name
- the parameter definition.- Returns:
- The class.
-
setParameterDefinition
public void setParameterDefinition(String name, Class obj)
Sets the class for a parameter.- Parameters:
name
- the parameter name.obj
- the parameter class.
-
convertPrimitiveClass
public static Class convertPrimitiveClass(Class obj)
Converts primitives to corresponding object class.- Parameters:
obj
- the class.- Returns:
- The class.
-
setParameter
public void setParameter(String name, Object value)
Sets a parameter.- Specified by:
setParameter
in interfaceObjectDescription
- Parameters:
name
- the name.value
- the value.
-
getParameterNames
public Iterator getParameterNames()
Returns an iterator for the parameter names.- Specified by:
getParameterNames
in interfaceObjectDescription
- Returns:
- The iterator.
-
getDefinedParameterNames
protected Iterator getDefinedParameterNames()
Returns an iterator for the parameter names.- Returns:
- The iterator.
-
getParameter
public Object getParameter(String name)
Returns a parameter value.- Specified by:
getParameter
in interfaceObjectDescription
- Parameters:
name
- the parameter name.- Returns:
- The parameter value.
-
getObjectClass
public Class getObjectClass()
Returns the class for the object.- Specified by:
getObjectClass
in interfaceObjectDescription
- Returns:
- The class.
-
getInstance
public ObjectDescription getInstance()
Returns a cloned instance of the object description. The contents of the parameter objects collection are cloned too, so that any already defined parameter value is copied to the new instance. 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.- Specified by:
getInstance
in interfaceObjectDescription
- Returns:
- A cloned instance.
-
getUnconfiguredInstance
public ObjectDescription getUnconfiguredInstance()
Returns a cloned instance of the object description. The contents of the parameter objects collection are cloned too, so that any already defined parameter value is copied to the new instance. 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.- Specified by:
getUnconfiguredInstance
in interfaceObjectDescription
- Returns:
- A cloned instance.
-
configure
public void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory. The configuration contains several keys and their defined values. The given reference to the configuration object will remain valid until the report parsing or writing ends. The configuration contents may change during the reporting.- Specified by:
configure
in interfaceObjectDescription
- Parameters:
config
- the configuration, never null
-
getConfig
public org.pentaho.reporting.libraries.base.config.Configuration getConfig()
Returns the configuration for that object description.- Returns:
- the configuration or null, if not yet set.
-
equals
public boolean equals(Object o)
Tests for equality.- Specified by:
equals
in interfaceObjectDescription
- Overrides:
equals
in classObject
- Parameters:
o
- the object to test.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for the object.- Specified by:
hashCode
in interfaceObjectDescription
- Overrides:
hashCode
in classObject
- Returns:
- The hash code.
-
-