|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aitools.programd.util.ObjectExemplarRegistry<B>
B - the base class for objects that will be registeredpublic abstract class ObjectExemplarRegistry<B>
Similar to ClassRegistry, but registers object exemplars.
| Field Summary | |
|---|---|
protected Hashtable<String,B> |
registry
The Hashtable that stores the objects. |
| Constructor Summary | |
|---|---|
ObjectExemplarRegistry(String[] classnames,
Class<B> objectType,
Object... constructorArguments)
Loads the registry with a set of exemplar objects. |
|
| Method Summary | |
|---|---|
B |
get(String classname)
A wrapper for the internal HashSet's get method. |
void |
register(String classname,
Object... constructorArguments)
Registers an individual exemplar object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable<String,B> registry
| Constructor Detail |
|---|
public ObjectExemplarRegistry(String[] classnames,
Class<B> objectType,
Object... constructorArguments)
classnames - the classnames for which to register exemplar objectsobjectType - the type of B (seems stupid to have to pass this in, but necessary to avoid some compiler errors)constructorArguments - the arguments for B's constructor| Method Detail |
|---|
public void register(String classname,
Object... constructorArguments)
classname - the name of the object to registerconstructorArguments - the arguments to the constructor
public B get(String classname)
throws NotARegisteredObjectException
classname - the classname for which an exemplar object is desired
NotARegisteredObjectException - if the given class is not
registered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||