state = ModuleState.PREPARING;
if (moduleDef.getImportPolicyClassName()!=null) {
try {
Class<ImportPolicy> importPolicyClass = (Class<ImportPolicy>) getPrivateClassLoader().loadClass(moduleDef.getImportPolicyClassName());
ImportPolicy importPolicy = importPolicyClass.newInstance();
importPolicy.prepare(this);
} catch(ClassNotFoundException e) {
state = ModuleState.ERROR;
throw new ResolveError(e);
} catch(java.lang.InstantiationException e) {
state = ModuleState.ERROR;