code: protected static GenericBeanDefinition createModuleBeanDefinition(String className, Map<String,String> params, String role)
          throws IOException {
          ScannedGenericBeanDefinition result = getScannedBeanDefinition(className);
          result.setParentName(Module.class.getName());
          result.setScope(BeanDefinition.SCOPE_SINGLETON);
          result.setAttribute("id", role);
          result.setAttribute("name", role);
          result.setAttribute("init-method", "initModule");
          result.setEnforceInitMethod(true);
          result.setAttribute("destroy-method", "shutdownModule");
          result.setEnforceDestroyMethod(true);
  
          ConstructorArgumentValues cArgs = new ConstructorArgumentValues();
          cArgs.addIndexedArgumentValue(0, params,MODULE_CONSTRUCTOR_PARAM1_CLASS);
          // one server bean in context
          BeanReference serverRef = new RuntimeBeanReference(MODULE_CONSTRUCTOR_PARAM2_CLASS);
          cArgs.addIndexedArgumentValue(1, serverRef);
          cArgs.addIndexedArgumentValue(2, role,MODULE_CONSTRUCTOR_PARAM3_CLASS);
          result.setConstructorArgumentValues(cArgs);
          return result;
      }
docs: Generates Spring Bean definitions for Fedora Modules.
  Server param should be unnecessary if autowired.
  @param className
  @param params
  @param role
  @return