com.acarter.scenemonitor.textdescriptor
Class A_TextDescriptorHandler

java.lang.Object
  extended by com.acarter.scenemonitor.textdescriptor.A_TextDescriptorHandler
Direct Known Subclasses:
EmptyDescriptorHandler, PhysicsDescriptorHandler, StandardDescriptorHandler

public abstract class A_TextDescriptorHandler
extends java.lang.Object

This class stores the information descriptor definitions.

Author:
Carter

Field Summary
protected  java.util.HashMap<java.lang.Class<?>,A_TextDescriptor> descriptors
          Set of descriptors for each tree object
static java.lang.String LOGGER_NAME
          Logger Name
 
Constructor Summary
A_TextDescriptorHandler()
          Constructor.
 
Method Summary
static boolean descriptorsExist()
          Checks if the default library of descriptors is in the classpath.
 A_TextDescriptor getDescriptor(java.lang.Object object)
          Returns the descriptor that is associated with the object.
protected abstract  void initDescriptors()
          Subclasses must load their own set of default descriptors.
 void registerDescriptor(java.lang.Class<?> classType, A_TextDescriptor descriptor)
          Adds the descriptor/object type pair to the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER_NAME

public static final java.lang.String LOGGER_NAME
Logger Name

See Also:
Constant Field Values

descriptors

protected java.util.HashMap<java.lang.Class<?>,A_TextDescriptor> descriptors
Set of descriptors for each tree object

Constructor Detail

A_TextDescriptorHandler

public A_TextDescriptorHandler()
Constructor.

Method Detail

descriptorsExist

public static boolean descriptorsExist()
Checks if the default library of descriptors is in the classpath.

Returns:
True if it is found, false otherwise.

initDescriptors

protected abstract void initDescriptors()
Subclasses must load their own set of default descriptors.


getDescriptor

public A_TextDescriptor getDescriptor(java.lang.Object object)
Returns the descriptor that is associated with the object. If an exact match is not defined, then it will search up the inheritance of the object to find the next closest match.

Parameters:
object - The object who's descriptor you want returned.
Returns:
The descriptor matching the object type.

registerDescriptor

public void registerDescriptor(java.lang.Class<?> classType,
                               A_TextDescriptor descriptor)
Adds the descriptor/object type pair to the collection.

Parameters:
classType -
descriptor -