Class ContentSpec

  • Direct Known Subclasses:
    ChoiceContentSpec, SeqContentSpec, TokenContentSpec

    public abstract class ContentSpec
    extends java.lang.Object
    Abstract base class for classes that contain parts of a content specification of an element defined in DTD. They are created by FullDTDReader when parsing an DTD subset, and they will be used for constructing actual validators for the element content.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected char mArity  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContentSpec​(char arity)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      char getArity()  
      abstract StructValidator getSimpleValidator()
      Method called by input element stack to get validator for this content specification, if this specification is simple enough not to need full DFA-based validator.
      boolean isLeaf()  
      abstract ModelNode rewrite()
      Method called as the first part of DFA construction, if necessary; will usually create simpler ModelNode instances that will match definition this instance contains.
      void setArity​(char c)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mArity

        protected char mArity
    • Constructor Detail

      • ContentSpec

        public ContentSpec​(char arity)
    • Method Detail

      • getArity

        public final char getArity()
      • setArity

        public final void setArity​(char c)
      • isLeaf

        public boolean isLeaf()
      • getSimpleValidator

        public abstract StructValidator getSimpleValidator()
        Method called by input element stack to get validator for this content specification, if this specification is simple enough not to need full DFA-based validator.
        Returns:
        Simple content model validator, if one can be directly constructed, or null to indicate that a DFA needs to be created.
      • rewrite

        public abstract ModelNode rewrite()
        Method called as the first part of DFA construction, if necessary; will usually create simpler ModelNode instances that will match definition this instance contains.