Skip to content

Commit

Permalink
Adding same-name setters for rule executor and type to ValidationRule
Browse files Browse the repository at this point in the history
for builder API for #60
  • Loading branch information
cduplichien committed May 25, 2014
1 parent d9c12e9 commit 2b60352
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,20 @@ public void setType(String type) {
public void setRuleExecutor(RuleExecutor<?, ?> ruleExecutor) {
this.ruleExecutor = ruleExecutor;
}

/**
* Delegates to setRuleExecutor, for better builder API semantics
*/
public void setHandler(RuleExecutor<?, ?> handlerImpl) {
setRuleExecutor(handlerImpl);
}

/**
* Delegates to setType, for better builder API semantics
*/
public void setHandler(String handlerName) {
setType(handlerName);
}

/**
* @return the value / argument
Expand Down

0 comments on commit 2b60352

Please sign in to comment.