String scriptDisplayName = module.getName();
if (scriptDisplayName == null) scriptDisplayName = "";
GenericProjectProperties properties = new GenericProjectProperties(scriptDisplayName, uniqueName, moduleDir);
JavaCompatibilityModel compatibilityModel = new JavaCompatibilityModel(sourceLevel, targetLevel);
List<NbListedDir> listedDirs = lookupListedDirs(sourceSets);
JavaTestModel testModel = JavaTestModel.getDefaulTestModel(moduleDir);
return new NbJavaModule(properties, compatibilityModel, sourceSets, listedDirs, testModel);