## org.apache.ivy.core.resolve
Class VisitNode

    java.lang.Object
      org.apache.ivy.core.resolve.VisitNode

    public class VisitNode

extends java.lang.Object

A visit node is an object used to represent one visit from one parent on an `IvyNode` of the dependency graph. During dependency resolution, the `ResolveEngine` visits nodes of the depency graph following the dependencies, thus the same node can be visited several times, if it is requested from several module. In this case you will have one VisitNode per parent and per root module configuration. Thus VisitNode stores data specific to the visit:

- parent
the node from which the visit is occuring
- parentConf
the configuration of the parent in which this node is visited
- rootModuleConf
the configuration of the root module which is currently resolved

Constructor Summary
`VisitNode(ResolveData data, IvyNode node, VisitNode parent, java.lang.String rootModuleConf, java.lang.String parentConf)`
`VisitNode(ResolveData data, IvyNode node, VisitNode parent, java.lang.String rootModuleConf, java.lang.String parentConf, IvyNodeUsage usage)`

Method Summary
`Configuration` `getConfiguration(java.lang.String conf)`
`java.lang.String[]` `getConfsToFetch()`
`java.util.Collection` `getDependencies(java.lang.String conf)`
`DependencyDescriptor` `getDependencyDescriptor()`
`ModuleDescriptor` `getDescriptor()`
`IvyNodeEviction.EvictionData` `getEvictedData()`
`java.util.Collection` `getEvictedRevisions(ModuleId moduleId)`
`IvyNodeEviction.EvictionData` `getEvictionDataInRoot(java.lang.String rootModuleConf, VisitNode ancestor)`
`ModuleRevisionId` `getId()`
`ModuleId` `getModuleId()`
`IvyNode` `getNode()`
`VisitNode` `getParent()`
`java.lang.String` `getParentConf()`
`java.util.Collection` `getPath()` Get an ordered collection with the nodes from the root to this node
`java.lang.String[]` `getRealConfs(java.lang.String conf)`
`IvyNode` `getRealNode()` Returns the 'real' node currently visited.
`java.lang.String` `getRequestedConf()`
`java.lang.String[]` `getRequiredConfigurations()`
`java.lang.String[]` `getRequiredConfigurations(VisitNode in, java.lang.String inConf)`
`ModuleRevisionId` `getResolvedId()`
`java.util.Collection` `getResolvedRevisions(ModuleId mid)`
`VisitNode` `getRoot()`
`static VisitNode` `getRoot(VisitNode parent)`
`java.lang.String` `getRootModuleConf()`
`boolean` `hasProblem()`
`boolean` `isCircular()` Returns true if this node can already be found in the path
`boolean` `isConfRequiredByMergedUsageOnly(java.lang.String conf)`
`boolean` `isEvicted()`
`protected boolean` `isParentConfTransitive()` Checks if the current node's parent configuration is transitive.
`boolean` `isTransitive()` Returns true if the current dependency descriptor is transitive and the parent configuration is transitive.
`boolean` `loadData(java.lang.String conf, boolean shouldBePublic)`
`void` `markEvicted(IvyNodeEviction.EvictionData evictionData)`
`void` `markEvicted(VisitNode parent, ConflictManager conflictMgr, java.util.Collection selected)` Marks the current node as evicted by the the given selected IvyNodes, in the given parent and root module configuration, with the given `ConflictManager`
`void` `setParentConf(java.lang.String parentConf)`
`void` `setRequestedConf(java.lang.String requestedConf)`
`java.lang.String` `toString()`
`void` `updateConfsToFetch(java.util.Collection confs)`
`void` `useRealNode()` Ask to the current visited node to use a real node only, if one exist.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VisitNode

    public VisitNode(ResolveData data,
                     IvyNode node,
                     VisitNode parent,
                     java.lang.String rootModuleConf,
                     java.lang.String parentConf)

### VisitNode

    public VisitNode(ResolveData data,
                     IvyNode node,
                     VisitNode parent,
                     java.lang.String rootModuleConf,
                     java.lang.String parentConf,
                     IvyNodeUsage usage)

Method Detail

### getNode

    public IvyNode getNode()

### getRequestedConf

    public java.lang.String getRequestedConf()

  Returns:
    Returns the configuration requested by the parent

### setRequestedConf

    public void setRequestedConf(java.lang.String requestedConf)

### getParent

    public VisitNode getParent()

### getRoot

    public VisitNode getRoot()

### getPath

    public java.util.Collection getPath()

  Get an ordered collection with the nodes from the root to this node

  Returns:

### getParentConf

    public java.lang.String getParentConf()

### setParentConf

    public void setParentConf(java.lang.String parentConf)

### getRootModuleConf

    public java.lang.String getRootModuleConf()

### getRoot

    public static VisitNode getRoot(VisitNode parent)

### isTransitive

    public boolean isTransitive()

  Returns true if the current dependency descriptor is transitive and the parent configuration is transitive. Otherwise returns false.

  Returns:
    true if current node is transitive and the parent configuration is transitive.

### isParentConfTransitive

    protected boolean isParentConfTransitive()

  Checks if the current node's parent configuration is transitive.

  Parameters:
    `node` - current node
  Returns:
    true if the node's parent configuration is transitive

### getRealNode

    public IvyNode getRealNode()

  Returns the 'real' node currently visited. 'Real' means that if we are visiting a node created originally with only a version constraint, and if this version constraint has been resolved to an existing node in the graph, we will return the existing node, and not the one originally used which is about to be discarded, since it's not possible to have in the graph two nodes for the same ModuleRevisionId

  Returns:
    the 'real' node currently visited.

### useRealNode

    public void useRealNode()

  Ask to the current visited node to use a real node only, if one exist. See getRealNode for details about what a 'real' node is.

### loadData

    public boolean loadData(java.lang.String conf,
                            boolean shouldBePublic)

### getDependencies

    public java.util.Collection getDependencies(java.lang.String conf)

### getResolvedId

    public ModuleRevisionId getResolvedId()

### updateConfsToFetch

    public void updateConfsToFetch(java.util.Collection confs)

### getId

    public ModuleRevisionId getId()

### isEvicted

    public boolean isEvicted()

### getRealConfs

    public java.lang.String[] getRealConfs(java.lang.String conf)

### hasProblem

    public boolean hasProblem()

### getConfiguration

    public Configuration getConfiguration(java.lang.String conf)

### getEvictedData

    public IvyNodeEviction.EvictionData getEvictedData()

### getDependencyDescriptor

    public DependencyDescriptor getDependencyDescriptor()

### isCircular

    public boolean isCircular()

  Returns true if this node can already be found in the path

  Returns:

### getConfsToFetch

    public java.lang.String[] getConfsToFetch()

### getRequiredConfigurations

    public java.lang.String[] getRequiredConfigurations(VisitNode in,
                                                        java.lang.String inConf)

### getModuleId

    public ModuleId getModuleId()

### getResolvedRevisions

    public java.util.Collection getResolvedRevisions(ModuleId mid)

### markEvicted

    public void markEvicted(IvyNodeEviction.EvictionData evictionData)

### getRequiredConfigurations

    public java.lang.String[] getRequiredConfigurations()

### markEvicted

    public void markEvicted(VisitNode parent,
                            ConflictManager conflictMgr,
                            java.util.Collection selected)

  Marks the current node as evicted by the the given selected IvyNodes, in the given parent and root module configuration, with the given `ConflictManager`

  Parameters:
    `parent` - the VisitNode in which eviction has been made
    `conflictMgr` - the conflict manager responsible for the eviction
    `selected` - a Collection of `IvyNode` which have been selected

### getDescriptor

    public ModuleDescriptor getDescriptor()

### getEvictionDataInRoot

    public IvyNodeEviction.EvictionData getEvictionDataInRoot(java.lang.String rootModuleConf,
                                                              VisitNode ancestor)

### getEvictedRevisions

    public java.util.Collection getEvictedRevisions(ModuleId moduleId)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### isConfRequiredByMergedUsageOnly

    public boolean isConfRequiredByMergedUsageOnly(java.lang.String conf)