public class StringValueRule extends Rule
| Constructor and Description |
|---|
StringValueRule(String value) |
| 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. |
StringValueRule |
description(String description) |
String |
getDescription() |
List<Suggestion> |
getSuggestions(Node node,
RamlParsingContext context)
Returns the suggestions of this specific rule
|
String |
getValue() |
boolean |
matches(Node node)
Check if the current rule matches the specified node
|
String |
toString() |
createNodeUsingFactory, getSuggestions, then, thenpublic StringValueRule(String value)
@Nonnull public List<Suggestion> getSuggestions(Node node, RamlParsingContext context)
RulegetSuggestions in class Rulenode - The nodecontext - The parse contextpublic boolean matches(@Nonnull Node node)
Rulepublic StringValueRule description(String description)
@Nonnull public Node apply(@Nonnull Node node)
RuleObjectRule, ArrayRule, KeyValueRule) replace child nodes.public String getDescription()
getDescription in class Rulepublic String getValue()
Copyright © 2016. All rights reserved.