Class DPattern

java.lang.Object
com.sun.tools.rngom.digested.DPattern
All Implemented Interfaces:
ParsedPattern
Direct Known Subclasses:
DContainerPattern, DDataPattern, DEmptyPattern, DGrammarPattern, DNotAllowedPattern, DRefPattern, DTextPattern, DUnaryPattern, DValuePattern

public abstract class DPattern extends Object implements ParsedPattern
Base class of all the patterns.
Author:
Kohsuke Kawaguchi ([email protected])
  • Constructor Details

    • DPattern

      public DPattern()
  • Method Details

    • getLocation

      public 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 a Parseable object that reparses this pattern.
    • isElement

      public final boolean isElement()
      Returns true if this is DElementPattern.
    • isAttribute

      public final boolean isAttribute()
      Returns true if this is DAttributePattern.