Interface Node

    • Field Detail

      • ATTR_MAIN_NODE

        static final int ATTR_MAIN_NODE
        Attribute bit to be set on main nodes. The definition of a main node depends on the graph's source. For Ant, a main node will be a target with a description attribute.
        See Also:
        Constant Field Values
      • ATTR_MISSING_NODE

        static final int ATTR_MISSING_NODE
        Attribute bit to be set on missing nodes, that is nodes created by the graph producer even if no such node exists in the original data source. The cause of such creations depends on the graph's source. For Ant projects, missing nodes may be created when a target (or an antcall) refers a non existing node.
        See Also:
        Constant Field Values
      • ATTR_CONDITIONAL_NODE

        static final int ATTR_CONDITIONAL_NODE
        Attribute bit to be set on conditional nodes. A node is conditional if the whole content's execution is subject to a condition like Ant targets with a if or unless attribute set.
        See Also:
        Constant Field Values
      • ATTR_START_NODE

        static final int ATTR_START_NODE
        Attribute bit to be set on the start node(s). The definition of a start node depends of the graph's source. For Ant, the start node is the default target.
        See Also:
        Constant Field Values
      • ATTR_PREFIXED_NODE

        static final int ATTR_PREFIXED_NODE
        Attribute bit to be set on the prefixed node(s). A node is prefixed if there exists a node with a shorter name corresponding to a target with the same location. Ant creates these for imported project files.
        See Also:
        Constant Field Values
    • Method Detail

      • getLinks

        Collection<Link> getLinks()
        Returns links originating from the node. The implementing class should ensure that the returned list only contains objects implementing the Link interface. The returned collection should allow modification operations.
        Returns:
        list of links.
      • getBackLinks

        Collection<Link> getBackLinks()
        Returns links coming to the node. The implementing class should ensure that the returned list only contains objects implementing the Link interface. The returned collection should allow modification operations.
        Returns:
        list of links.
      • addLink

        void addLink​(Link link)
        Add a link to the node. This method should be called when the link starts from the node. The implementations should try to preserve the order in which the nodes were added.
        Parameters:
        link - link to add
      • addBackLink

        void addBackLink​(Link link)
        Add a link to the node. This method should be called when the link ends at the node. The implementations should try to preserve the order in which the nodes were added.
        Parameters:
        link - link to add
      • removeLink

        void removeLink​(Link link)
        Remove a link from the node. This method should be called when the link starts from the node.
        Parameters:
        link - link to remove
      • removeBackLink

        void removeBackLink​(Link link)
        Remove a link from the node. This method should be called when the link ends at the node.
        Parameters:
        link - link to remove
      • getDescription

        String getDescription()
        Returns a short description (one line of less) of the node.
        Returns:
        description.
      • setDescription

        void setDescription​(String description)
        Sets the node's description.
        Parameters:
        description - node's description
      • accept

        void accept​(NodeVisitor visitor)
        Accepts a visitor. The implementation should call the appropriate visitNode method of the visitor.
        Parameters:
        visitor - NodeVisitor
      • getSource

        String getSource()
        Returns the source snippet for the node. Implementations may return null if no source is available or if the source concept is not relevant.
        Returns:
        The source snippet for the node or null;