gnu.expr
Class ModuleContext
java.lang.Object
gnu.expr.ModuleContext
public class ModuleContext
- extends java.lang.Object
Maps modules to module instances.
Given a class, species a specific instance object for that class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModuleContext
public ModuleContext(ModuleManager manager)
getContext
public static ModuleContext getContext()
- For now returns the shared global ModuleContext.
Later provide a means for thread-specific overriding.
getManager
public ModuleManager getManager()
findInstance
public java.lang.Object findInstance(ModuleInfo info)
- If there is no instance of the argument's class, allocated one.
searchInstance
public java.lang.Object searchInstance(java.lang.Class clas)
findInstance
public java.lang.Object findInstance(java.lang.Class clas)
setInstance
public void setInstance(java.lang.Object instance)
findFromInstance
public ModuleInfo findFromInstance(java.lang.Object instance)