org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.stylekey
Class AbstractStyleKeyFactory

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.stylekey.AbstractStyleKeyFactory
All Implemented Interfaces:
Serializable, StyleKeyFactory
Direct Known Subclasses:
DefaultStyleKeyFactory, PageableLayoutStyleKeyFactory

public abstract class AbstractStyleKeyFactory
extends Object
implements StyleKeyFactory

An abstract class for implementing the StyleKeyFactory interface.

Author:
Thomas Morgner.
See Also:
Serialized Form

Field Summary
static String OBJECT_FACTORY_TAG
          the parser configuration property name for this factory.
 
Method Summary
 void addKey(StyleKey key)
          Registers a key.
 Object createBasicObject(StyleKey k, String value, Class c, ClassFactory fc)
          Creates an object.
 boolean equals(Object o)
          Indicated whether an other object is equal to this one.
 Iterator getRegisteredKeys()
          Returns an iterator that provides access to the registered keys.
 StyleKey getStyleKey(String name)
          Returns the key with the given name.
 int hashCode()
          Computes an hashcode for this factory.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_FACTORY_TAG

public static final String OBJECT_FACTORY_TAG
the parser configuration property name for this factory.

See Also:
Constant Field Values
Method Detail

addKey

public void addKey(StyleKey key)
Registers a key.

Parameters:
key - the key.

getStyleKey

public StyleKey getStyleKey(String name)
Returns the key with the given name.

Specified by:
getStyleKey in interface StyleKeyFactory
Parameters:
name - the name.
Returns:
The key.

createBasicObject

public Object createBasicObject(StyleKey k,
                                String value,
                                Class c,
                                ClassFactory fc)
Creates an object.

Specified by:
createBasicObject in interface StyleKeyFactory
Parameters:
k - the style key.
value - the value.
c - the class.
fc - the class factory used to create the basic object.
Returns:
The object.

getRegisteredKeys

public Iterator getRegisteredKeys()
Returns an iterator that provides access to the registered keys.

Specified by:
getRegisteredKeys in interface StyleKeyFactory
Returns:
The iterator.

equals

public boolean equals(Object o)
Indicated whether an other object is equal to this one.

Overrides:
equals in class Object
Parameters:
o - the other object.
Returns:
true, if the 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 class Object
Returns:
the hashcode.
See Also:
Object.hashCode()