public class FirstOfRule extends AnyOfRule
| Constructor and Description |
|---|
FirstOfRule(List<Rule> rules) |
| Modifier and Type | Method and Description |
|---|---|
Node |
apply(Node node)
Applies the rule to the node using the following criteria
- if rule does not match returns an ErrorNode and stops processing
- if rule matches, applies rules to children
- if rule contains a NodeFactory, returns the result of it
- else returns node
Only structure rules (
ObjectRule, ArrayRule, KeyValueRule) replace child nodes. |
List<Suggestion> |
getSuggestions(Node node,
ParsingContext context)
Returns the suggestions of this specific rule
|
add, addAll, getChildren, getDescription, getMatchingRule, getRules, getSuggestions, matchescleanFactory, createNodeUsingFactory, getFactory, named, ruleName, then, then, toString@Nonnull public List<Suggestion> getSuggestions(Node node, ParsingContext context)
RulegetSuggestions in class AnyOfRulenode - The nodecontext - The parse contextpublic Node apply(@Nonnull Node node)
RuleObjectRule, ArrayRule, KeyValueRule) replace child nodes.Copyright © 2017. All rights reserved.