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> Vaccept(DPatternVisitor<V> visitor)ParseablecreateParseable()Creates aParseableobject that reparses this pattern.DAnnotationgetAnnotation()Returns the annotation associated with it.org.xml.sax.LocatorgetLocation()Returns where the pattern is defined in the source code.DPatterngetNext()booleanisAttribute()Returns true if this isDAttributePattern.booleanisElement()Returns true if this isDElementPattern.abstract booleanisNullable()Returns true if this pattern is nullable.DPatternsetNext(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 aParseableobject 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()
-
-