public synchronized void register(String dottedname, String classname)
{
try {
Class cls = Class.forName(classname);
NativeNamespace ns = (NativeNamespace)anvil.script.compiler.Compiled.getstatic(cls, "__module__");
if (ns == null) {
throw new RuntimeException("Static field __module__ is null - couldn't load module '" + classname + "' as '" + dottedname + "'");
}
register(dottedname, ns);