code: private void addRule(String className, Priority priority) {
          Rule rule;
          try {
              rule = (Rule) Class.forName(className).newInstance();
          } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
              throw new XmlRuleSetException("Could not instantiate rule " + className + ".", e);
          }
          rule.setPriority(priority);
          addRule(rule);
      }
docs: Instantiates and adds an instance of a {@link Rule} with the given class name to the list of rules contained in
  this {@link RuleSet} and configures the {@link Priority} accordingly.
  
  @param className class name of the {@link Rule} to be added
  @param priority  priority of the {@link Rule} to be added