|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.virtualmock.rule.RuleManager
Class which handles evaluation and reporting of rules and rule violations. This method checkAllRulesInCurrentPhase performs checks for all Rules that are applicable to the current phase. New rules can be added at runtime. If a new rule is added which has the same key as an existing rule, the old rule will be replaced.
| Constructor Summary | |
RuleManager(java.util.List rules,
ResourceManager resourceManager)
Creates a new RuleManager object. |
|
| Method Summary | |
void |
addRule(Rule rule)
Adds a rule to be checked. |
void |
checkAllRulesInCurrentPhase()
Checks all rules in current phase. |
Rule |
getRule(java.lang.String key)
Returns the Rule for the specified key, or null if no Rule matches the key. |
java.util.List |
getRules()
Returns all of the rules that are currently defined. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RuleManager(java.util.List rules,
ResourceManager resourceManager)
rules - the initial list of Rules which will be managedresourceManager - the ResourceManager to be used when creating
messages| Method Detail |
public Rule getRule(java.lang.String key)
key - DOCUMENT ME! (Constructor Parameter)
public java.util.List getRules()
public void addRule(Rule rule)
rule - the Rule that is being addedpublic void checkAllRulesInCurrentPhase()
java.lang.Error - if the rule was violated
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||