Class DefaultElementFactory
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.elements.DefaultElementFactory
-
- All Implemented Interfaces:
Serializable
,ElementFactory
public class DefaultElementFactory extends Object implements ElementFactory
A default implementation of theElementFactory
interface.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultElementFactory()
Creates a new element factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compares this object with the given object for equality.Element
getElementForType(String type)
Returns an element for the specified type.int
hashCode()
Computes an hashcode for this factory.
-
-
-
Method Detail
-
getElementForType
public Element getElementForType(String type)
Returns an element for the specified type. This implementation assumes, that all elements have a public default constructor and uses Class.newInstance() to create a new instance of that element.- Specified by:
getElementForType
in interfaceElementFactory
- Parameters:
type
- the type.- Returns:
- The element.
-
equals
public boolean equals(Object o)
Compares this object with the given object for equality. The object will be considered equal if it is a element factory and contains the same elements.- Overrides:
equals
in classObject
- Parameters:
o
- the object that should be compared.- Returns:
- true, if the given object is equal, false otherwise.
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Computes an hashcode for this factory.- Overrides:
hashCode
in classObject
- Returns:
- the hashcode.
- See Also:
Object.hashCode()
-
-