Class Define

  • All Implemented Interfaces:
    java.lang.Iterable<Leaf>, ParsedPattern
    Direct Known Subclasses:
    Grammar

    public class Define
    extends WriterNode
    A named pattern.
    Author:
    Kohsuke Kawaguchi
    • Constructor Summary

      Constructors 
      Constructor Description
      Define​(Grammar scope, java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isInline()
      Returns true if this define only contains one child (and thus considered inlinable.) A pattern definition is also inlineable if it's the start of the grammar (because "start" isn't a meaningful name)
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • scope

        public final Grammar scope
      • name

        public final java.lang.String name
    • Constructor Detail

      • Define

        public Define​(Grammar scope,
                      java.lang.String name)
    • Method Detail

      • isInline

        public boolean isInline()
        Returns true if this define only contains one child (and thus considered inlinable.) A pattern definition is also inlineable if it's the start of the grammar (because "start" isn't a meaningful name)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object