atg.cortex
Class CortexIntrospectorImpl

java.lang.Object
  extended by atg.cortex.CortexIntrospectorImpl
All Implemented Interfaces:
CortexIntrospector

public class CortexIntrospectorImpl
extends java.lang.Object
implements CortexIntrospector

This class is an implementation of CortexIntrospector that uses the following rules to resolve classes to Cortex objects. The rules are based on those used by java.beans.Introspector.

See Also:
Introspector

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
CortexIntrospectorImpl()
          Constructs and returns a new CortexIntrospectorImpl
 
Method Summary
protected  void addToCache(java.lang.Class pClass, Cortex pCortex)
          Adds the specified mapping from class to Cortex, replacing any existing mapping for that class.
 java.util.Dictionary getCache()
          Returns the cache mapping Class to Cortex
 Cortex getCortex(java.lang.Class pClass)
          Returns the Cortex associated with the given class.
 void registerCortex(java.lang.Class pClass, Cortex pCortex)
          Registers the specified Cortex for the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CortexIntrospectorImpl

public CortexIntrospectorImpl()
Constructs and returns a new CortexIntrospectorImpl

Method Detail

getCache

public java.util.Dictionary getCache()
Returns the cache mapping Class to Cortex


addToCache

protected void addToCache(java.lang.Class pClass,
                          Cortex pCortex)
Adds the specified mapping from class to Cortex, replacing any existing mapping for that class. Subclasses that implement their own methods for finding Cortex objects can use this to cache their results.


getCortex

public Cortex getCortex(java.lang.Class pClass)
Returns the Cortex associated with the given class.

Specified by:
getCortex in interface CortexIntrospector
Parameters:
pClass - the class for which a Cortex is to be found
Returns:
the Cortex corresponding to the given class

registerCortex

public void registerCortex(java.lang.Class pClass,
                           Cortex pCortex)
Registers the specified Cortex for the specified class.

Specified by:
registerCortex in interface CortexIntrospector
Parameters:
pClass - the Class with which the specified cortex is to be associated.
pCortex - the Cortex to be associated with the specified class