Class NodeText


  • class NodeText
    extends java.lang.Object
    This contains the lexical information for a single node. It is basically a list of tokens and children.
    • Constructor Detail

      • NodeText

        NodeText​(java.util.List<TextElement> elements)
      • NodeText

        NodeText()
        Initialize with an empty list of elements.
    • Method Detail

      • addElement

        void addElement​(TextElement nodeTextElement)
        Add an element at the end.
      • addElement

        void addElement​(int index,
                        TextElement nodeTextElement)
        Add an element at the given position.
      • addChild

        void addChild​(Node child)
      • addChild

        void addChild​(int index,
                      Node child)
      • addToken

        void addToken​(int tokenKind,
                      java.lang.String text)
      • addToken

        void addToken​(int index,
                      int tokenKind,
                      java.lang.String text)
      • findChild

        int findChild​(Node child)
      • findChild

        int findChild​(Node child,
                      int from)
      • tryToFindChild

        int tryToFindChild​(Node child)
      • tryToFindChild

        int tryToFindChild​(Node child,
                           int from)
      • remove

        public void remove​(TextElementMatcher matcher,
                           boolean potentiallyFollowingWhitespace)
      • removeElement

        void removeElement​(int index)
      • expand

        java.lang.String expand()
        Generate the corresponding string.
      • numberOfElements

        int numberOfElements()
      • getTextElement

        TextElement getTextElement​(int index)
      • getElements

        java.util.List<TextElement> getElements()
      • toString

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

        public boolean endWithSpace()
      • removeLastElement

        public void removeLastElement()