Class DPattern
- java.lang.Object
-
- org.kohsuke.rngom.rngparser.digested.DPattern
-
- All Implemented Interfaces:
ParsedPattern
- Direct Known Subclasses:
DContainerPattern
,DDataPattern
,DEmptyPattern
,DGrammarPattern
,DNotAllowedPattern
,DRefPattern
,DTextPattern
,DUnaryPattern
,DValuePattern
public abstract class DPattern extends java.lang.Object implements ParsedPattern
Base class of all the patterns.
-
-
Constructor Summary
Constructors Constructor Description DPattern()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <V> V
accept(DPatternVisitor<V> visitor)
Parseable
createParseable()
Creates aParseable
object that reparses this pattern.DAnnotation
getAnnotation()
Returns the annotation associated with it.org.xml.sax.Locator
getLocation()
Returns where the pattern is defined in the source code.DPattern
getNext()
boolean
isAttribute()
Returns true if this isDAttributePattern
.boolean
isElement()
Returns true if this isDElementPattern
.abstract boolean
isNullable()
Returns true if this pattern is nullable.DPattern
setNext(DPattern next)
-
-
-
Method Detail
-
getLocation
public org.xml.sax.Locator getLocation()
Returns where the pattern is defined in the source code.
-
getAnnotation
public DAnnotation getAnnotation()
Returns the annotation associated with it.- Returns:
- may be empty, but never be null.
-
isNullable
public abstract boolean isNullable()
Returns true if this pattern is nullable. A nullable pattern is a pattern that can match the empty sequence.
-
accept
public abstract <V> V accept(DPatternVisitor<V> visitor)
-
createParseable
public Parseable createParseable()
Creates aParseable
object that reparses this pattern.
-
isElement
public final boolean isElement()
Returns true if this isDElementPattern
.
-
isAttribute
public final boolean isAttribute()
Returns true if this isDAttributePattern
.
-
getNext
public DPattern getNext()
-
-