private void maybePrecompileModules(BatchingStrategy batchingStrategy,
TreeLogger treeLogger) throws UnableToCompleteException {
if (preCompiledModuleDefs == null) {
preCompiledModuleDefs = new HashMap<String, ModuleDef>();
for (String moduleName : GWTTestCase.getAllTestModuleNames()) {
TestModuleInfo moduleInfo = GWTTestCase.getTestsForModule(moduleName);
String syntheticModuleName = moduleInfo.getSyntheticModuleName();
if (syntheticModuleName != null) {
ModuleDef moduleDef = maybeCompileModuleImpl(
moduleInfo.getModuleName(), syntheticModuleName,
moduleInfo.getStrategy(), batchingStrategy, treeLogger);
preCompiledModuleDefs.put(syntheticModuleName, moduleDef);
}
}
}
}