|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aitools.programd.util.ClassRegistry<B>
B - the base class for classes that will be registeredpublic abstract class ClassRegistry<B>
Registers classes with aliases.
| Field Summary | |
|---|---|
protected Hashtable<String,Class<? extends B>> |
registry
The Hashtable that stores the classes. |
| Constructor Summary | |
|---|---|
ClassRegistry(String[] classnames)
Loads the registry with a set of classes. |
|
| Method Summary | |
|---|---|
Class<? extends B> |
get(String label)
A wrapper for the internal Hashtable's get method. |
void |
register(String classname)
Registers an individual class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable<String,Class<? extends B>> registry
| Constructor Detail |
|---|
public ClassRegistry(String[] classnames)
classnames - the names of the classes to register| Method Detail |
|---|
public void register(String classname)
classname - the name of the class to register
public Class<? extends B> get(String label)
throws NotARegisteredClassException
label - the label of the Class desired.
NotARegisteredClassException - if the given class is not registered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||