public class BnfRandom extends java.lang.Object implements BnfVisitor
| Constructor and Description |
|---|
BnfRandom() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getRandomSQL() |
int |
getStatementCount() |
void |
setSeed(int seed) |
void |
visitRuleElement(boolean keyword,
java.lang.String name,
Rule link)
Visit a rule element.
|
void |
visitRuleFixed(int type)
Visit a fixed rule.
|
void |
visitRuleList(boolean or,
java.util.ArrayList<Rule> list)
Visit a rule list.
|
void |
visitRuleOptional(Rule rule)
Visit an optional rule.
|
void |
visitRuleRepeat(boolean comma,
Rule rule)
Visit a repeat rule.
|
public BnfRandom()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getRandomSQL()
public void visitRuleElement(boolean keyword,
java.lang.String name,
Rule link)
BnfVisitorvisitRuleElement in interface BnfVisitorkeyword - whether this is a keywordname - the element namelink - the linked rule if it's not a keywordpublic void visitRuleFixed(int type)
BnfVisitorvisitRuleFixed in interface BnfVisitortype - the typepublic void visitRuleList(boolean or,
java.util.ArrayList<Rule> list)
BnfVisitorvisitRuleList in interface BnfVisitoror - true for OR, false for ANDlist - the rulespublic void visitRuleOptional(Rule rule)
BnfVisitorvisitRuleOptional in interface BnfVisitorrule - the rulepublic void visitRuleRepeat(boolean comma,
Rule rule)
BnfVisitorvisitRuleRepeat in interface BnfVisitorcomma - whether the comma is repeated as wellrule - the element to repeatpublic void setSeed(int seed)
public int getStatementCount()