com.generationjava.patterns.registry
Class ClassRegistry

java.lang.Object
  |
  +--com.generationjava.patterns.registry.AbstractRegistry
        |
        +--com.generationjava.patterns.registry.SimpleRegistry
              |
              +--com.generationjava.patterns.registry.ClassRegistry
All Implemented Interfaces:
Registry

public class ClassRegistry
extends SimpleRegistry

A registry which stores objects by a key Class. When obtaining the object, it will check inheritence and interface trees to see if the Class matches.


Constructor Summary
ClassRegistry()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Get the object from the registry.
 
Methods inherited from class com.generationjava.patterns.registry.SimpleRegistry
clear, getMap, keys, register, remove, toString
 
Methods inherited from class com.generationjava.patterns.registry.AbstractRegistry
getNull, getRegistryFactory, setNull, setRegistryFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassRegistry

public ClassRegistry()
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Get the object from the registry. If the key is not a Class object, then it uses the Class of the object.

Specified by:
get in interface Registry
Overrides:
get in class SimpleRegistry


Copyright © 2000-2003 GenerationJava. All Rights Reserved.