## org.h2.test.synth
Class BnfRandom

    java.lang.Object
      org.h2.test.synth.BnfRandom

All Implemented Interfaces:
  BnfVisitor

    public class BnfRandom

extends java.lang.Object
implements BnfVisitor

A BNF visitor that generates a random SQL statement.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getRandomSQL

    public java.lang.String getRandomSQL()

### visitRuleElement

    public void visitRuleElement(boolean keyword,
                                 java.lang.String name,
                                 Rule link)

  Description copied from interface: `BnfVisitor`
  Visit a rule element.

  Specified by:
    `visitRuleElement` in interface `BnfVisitor`
  Parameters:
    `keyword` - whether this is a keyword
    `name` - the element name
    `link` - the linked rule if it's not a keyword

### visitRuleFixed

    public void visitRuleFixed(int type)

  Description copied from interface: `BnfVisitor`
  Visit a fixed rule.

  Specified by:
    `visitRuleFixed` in interface `BnfVisitor`
  Parameters:
    `type` - the type

### visitRuleList

    public void visitRuleList(boolean or,
                              java.util.ArrayList<Rule> list)

  Description copied from interface: `BnfVisitor`
  Visit a rule list.

  Specified by:
    `visitRuleList` in interface `BnfVisitor`
  Parameters:
    `or` - true for OR, false for AND
    `list` - the rules

### visitRuleOptional

    public void visitRuleOptional(Rule rule)

  Description copied from interface: `BnfVisitor`
  Visit an optional rule.

  Specified by:
    `visitRuleOptional` in interface `BnfVisitor`
  Parameters:
    `rule` - the rule

### visitRuleRepeat

    public void visitRuleRepeat(boolean comma,
                                Rule rule)

  Description copied from interface: `BnfVisitor`
  Visit a repeat rule.

  Specified by:
    `visitRuleRepeat` in interface `BnfVisitor`
  Parameters:
    `comma` - whether the comma is repeated as well
    `rule` - the element to repeat

### setSeed

    public void setSeed(int seed)

### getStatementCount

    public int getStatementCount()