public void setBeanFactory(BeanFactory factory) throws BeansException {
this.beanFactory = factory;
}
private RuleBase createObject() {
RuleBaseBuilder builder = new RuleBaseBuilder();
if (conflictResolver != null) {
builder.setConflictResolver(conflictResolver);
}
if (factHandleFactory != null) {
builder.setFactHandleFactory(factHandleFactory);
}
if (ruleSets == null) {
ruleSets = new HashSet();
}
if (autoDetectRuleSets) {
autoDetectRuleSets(ruleSets);
}
for (Iterator iter = ruleSets.iterator(); iter.hasNext();) {
RuleSet ruleSet = (RuleSet) iter.next();
try {
builder.addRuleSet(ruleSet);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return builder.build();
}