Class TextElement

    • Constructor Detail

      • TextElement

        public TextElement()
    • Method Detail

      • expand

        abstract java.lang.String expand()
      • isToken

        abstract boolean isToken​(int tokenKind)
      • isCommentToken

        final boolean isCommentToken()
      • isNode

        abstract boolean isNode​(Node node)
      • isWhiteSpace

        public abstract boolean isWhiteSpace()
      • isSpaceOrTab

        public abstract boolean isSpaceOrTab()
      • isNewline

        public abstract boolean isNewline()
      • isComment

        public abstract boolean isComment()
      • isSeparator

        public abstract boolean isSeparator()
      • isIdentifier

        public abstract boolean isIdentifier()
      • isPrimitive

        public abstract boolean isPrimitive()
      • isWhiteSpaceOrComment

        public final boolean isWhiteSpaceOrComment()
      • isChildOfClass

        public abstract boolean isChildOfClass​(java.lang.Class<? extends Node> nodeClass)
        Is this TextElement representing a child of the given class?
      • isChild

        public boolean isChild()
      • getRange

        abstract java.util.Optional<Range> getRange()
      • matchByRange

        TextElementMatcher matchByRange()
        Creates a TextElementMatcher that matches any TextElement with the same range as this TextElement.
        This can be used to curry another TextElementMatcher.
        e.g. someTextElementMatcher.and(textElement.matchByRange());
        Returns:
        TextElementMatcher that matches any TextElement with the same Range