Class AbstractNode<T extends Node>

    • Constructor Detail

      • AbstractNode

        public AbstractNode​(SourceLocation sourceLocation,
                            java.util.List<Comment> comments,
                            IgnoredChars ignoredChars,
                            java.util.Map<java.lang.String,​java.lang.String> additionalData)
    • Method Detail

      • getComments

        public java.util.List<Comment> getComments()
        Description copied from interface: Node
        Nodes can have comments made on them, the following is one comment per line before a node.
        Specified by:
        getComments in interface Node<T extends Node>
        Returns:
        the list of comments or an empty list of there are none
      • getIgnoredChars

        public IgnoredChars getIgnoredChars()
        Description copied from interface: Node
        The chars which are ignored by the parser. (Before and after the current node)
        Specified by:
        getIgnoredChars in interface Node<T extends Node>
        Returns:
        the ignored chars
      • getAdditionalData

        public java.util.Map<java.lang.String,​java.lang.String> getAdditionalData()
        Description copied from interface: Node
        A node can have a map of additional data associated with it.

        NOTE: The reason this is a map of strings is so the Node can stay an immutable object, which Map<String,Object> would not allow say.

        Specified by:
        getAdditionalData in interface Node<T extends Node>
        Returns:
        the map of additional data about this node
      • deepCopy

        protected <V extends Node> V deepCopy​(V nullableObj)
      • deepCopy

        protected <V extends Node> java.util.List<V> deepCopy​(java.util.List<? extends Node> list)