Class DGrammarPattern
- java.lang.Object
-
- org.kohsuke.rngom.rngparser.digested.DPattern
-
- org.kohsuke.rngom.rngparser.digested.DGrammarPattern
-
- All Implemented Interfaces:
java.lang.Iterable<DDefine>
,ParsedPattern
public class DGrammarPattern extends DPattern implements java.lang.Iterable<DDefine>
<grammar> pattern, which is a collection of named patterns.
-
-
Constructor Summary
Constructors Constructor Description DGrammarPattern()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> V
accept(DPatternVisitor<V> visitor)
DDefine
get(java.lang.String name)
Gets the named pattern by its name.DPattern
getStart()
Gets the start pattern.boolean
isNullable()
Returns true if this pattern is nullable.java.util.Iterator<DDefine>
iterator()
Iterates all theDDefine
s in this grammar.-
Methods inherited from class org.kohsuke.rngom.rngparser.digested.DPattern
createParseable, getAnnotation, getLocation, getNext, isAttribute, isElement, setNext
-
-
-
-
Method Detail
-
getStart
public DPattern getStart()
Gets the start pattern.
-
get
public DDefine get(java.lang.String name)
Gets the named pattern by its name.- Returns:
- null if not found.
-
iterator
public java.util.Iterator<DDefine> iterator()
Iterates all theDDefine
s in this grammar.- Specified by:
iterator
in interfacejava.lang.Iterable<DDefine>
-
isNullable
public boolean isNullable()
Description copied from class:DPattern
Returns true if this pattern is nullable. A nullable pattern is a pattern that can match the empty sequence.- Specified by:
isNullable
in classDPattern
-
accept
public <V> V accept(DPatternVisitor<V> visitor)
-
-