Interface ObjectDescription
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
TemplateDescription
- All Known Implementing Classes:
AbstractObjectDescription
,AbstractTemplateDescription
,AlignmentObjectDescription
,AnchorFieldTemplateDescription
,ArrayObjectDescription
,BasicStrokeObjectDescription
,BeanObjectDescription
,BooleanObjectDescription
,BorderStyleObjectDescription
,BoxSizingObjectDescription
,ByteObjectDescription
,CharacterObjectDescription
,ClassLoaderObjectDescription
,CollectionObjectDescription
,ColorObjectDescription
,ComponentFieldTemplateDescription
,DateFieldTemplateDescription
,DateObjectDescription
,DecimalFormatObjectDescription
,Dimension2DObjectDescription
,DimensionObjectDescription
,DoubleObjectDescription
,DrawableFieldTemplateDescription
,DrawableURLElementTemplateDescription
,DrawableURLFieldTemplateDescription
,ElementStyleSheetObjectDescription
,Ellipse2DObjectDescription
,EllipseTemplateDescription
,FloatObjectDescription
,FontDefinitionObjectDescription
,FontSmoothObjectDescription
,GeneralPathObjectDescription
,HorizontalLineTemplateDescription
,ImageFieldTemplateDescription
,ImageURLElementTemplateDescription
,ImageURLFieldTemplateDescription
,IntegerObjectDescription
,LabelTemplateDescription
,Line2DObjectDescription
,LongObjectDescription
,MessageFieldTemplateDescription
,NumberFieldTemplateDescription
,PathIteratorSegmentObjectDescription
,Point2DObjectDescription
,Rectangle2DObjectDescription
,RectangleTemplateDescription
,ResourceFieldTemplateDescription
,ResourceLabelTemplateDescription
,ResourceMessageTemplateDescription
,RoundRectangle2DObjectDescription
,RoundRectangleTemplateDescription
,ShapeFieldTemplateDescription
,ShortObjectDescription
,SimpleDateFormatObjectDescription
,StringFieldTemplateDescription
,StringObjectDescription
,TextWrapObjectDescription
,TimeZoneObjectDescription
,URLFilterObjectDescription
,URLObjectDescription
,VerticalAlignmentObjectDescription
,VerticalLineTemplateDescription
,WhitespaceCollapseObjectDescription
public interface ObjectDescription extends Serializable
An interface for object descriptions.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory.Object
createObject()
Creates an object based on the description.boolean
equals(Object o)
Compares whether two object descriptions are equal.ObjectDescription
getInstance()
Returns a cloned instance of the object description.Class
getObjectClass()
Returns the object class.Object
getParameter(String name)
Returns the value of a parameter.Class
getParameterDefinition(String name)
Returns a parameter definition.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(String name, Object value)
Sets the value of a parameter.void
setParameterFromObject(Object o)
Sets the parameters of this description object to match the supplied object.
-
-
-
Method Detail
-
getParameterDefinition
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.
-
setParameter
void setParameter(String name, Object value)
Sets the value of a parameter.- Parameters:
name
- the parameter name.value
- the parameter value.
-
getParameter
Object getParameter(String name)
Returns the value of a parameter.- Parameters:
name
- the parameter name.- Returns:
- The value.
-
getParameterNames
Iterator getParameterNames()
Returns an iterator the provides access to the parameter names. This returns all _known_ parameter names, the object description may accept additional parameters.- Returns:
- The iterator.
-
getObjectClass
Class getObjectClass()
Returns the object class.- Returns:
- The Class.
-
createObject
Object createObject()
Creates an object based on the description.- Returns:
- The object.
-
getUnconfiguredInstance
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.- Returns:
- A cloned instance.
-
getInstance
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.- Returns:
- A cloned instance.
-
setParameterFromObject
void setParameterFromObject(Object o) throws ObjectFactoryException
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.
-
configure
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.- Parameters:
config
- the configuration, never null
-
equals
boolean equals(Object o)
Compares whether two object descriptions are equal.
-
-