gnu.expr
Class ModuleContext
public class ModuleContext
extends java.lang.Object
Maps modules to module instances.
Given a class, species a specific instance object for that class.
checkInstance
public Object checkInstance(ModuleInfo info)
findFromInstance
public ModuleInfo findFromInstance(Object instance)
findInstance
public Object findInstance(ModuleInfo info)
If there is no instance of the argument's class, allocated one.
getContext
public static ModuleContext getContext()
For now returns the shared global ModuleContext.
Later provide a means for thread-specific overriding.
makeInstance
public Object makeInstance(ModuleInfo info)
Allocate a new instance of the class corresponding to the argument.
setInstance
public void setInstance(ModuleInfo info,
Object instance)