moduleDef = loadModule(moduleName);
fixUserAgentProperty(moduleDef, userAgentString);
// Create a sandbox for the module.
CompilationState compilationState = moduleDef.getCompilationState(getLogger());
typeOracle = compilationState.getTypeOracle();
ModuleSpaceHost moduleSpaceHost =
(ModuleSpaceHost) ShellModuleSpaceHost.class.getConstructors()[0].newInstance(getLogger(),
compilationState, moduleDef, genDir, new ArtifactAcceptor() {
public void accept(TreeLogger logger, ArtifactSet newlyGeneratedArtifacts)
throws UnableToCompleteException {
}