Package org.apache.ivy.core.resolve
Class ResolveData
- java.lang.Object
-
- org.apache.ivy.core.resolve.ResolveData
-
public class ResolveData extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedModuleRevisioncurrentResolvedModuleRevisionprivate VisitNodecurrentVisitNodeprivate ResolveEngineengineprivate ResolveOptionsoptionsprivate ConfigurationResolveReportreportprivate java.util.Map<ModuleRevisionId,VisitData>visitData
-
Constructor Summary
Constructors Constructor Description ResolveData(ResolveData data, boolean validate)ResolveData(ResolveEngine engine, ResolveOptions options)ResolveData(ResolveEngine engine, ResolveOptions options, ConfigurationResolveReport report)ResolveData(ResolveEngine engine, ResolveOptions options, ConfigurationResolveReport report, java.util.Map<ModuleRevisionId,VisitData> visitData)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidblacklist(IvyNode node)ResolvedModuleRevisiongetCurrentResolvedModuleRevision()Returns the lastResolvedModuleRevisionwhich has been currently resolved.VisitNodegetCurrentVisitNode()Returns the VisitNode currently visited, ornullif there is no node currently visited in this context.java.util.DategetDate()ResolveEnginegetEngine()EventManagergetEventManager()IvyNodegetNode(ModuleRevisionId mrid)java.util.Collection<ModuleRevisionId>getNodeIds()java.util.Collection<IvyNode>getNodes()ResolveOptionsgetOptions()ConfigurationResolveReportgetReport()ResolveEngineSettingsgetSettings()VisitDatagetVisitData(ModuleRevisionId mrid)booleanisBlacklisted(java.lang.String rootModuleConf, ModuleRevisionId mrid)private static booleanisEqual(java.lang.Object obj1, java.lang.Object obj2)private static <K,V>
booleanisSubMap(java.util.Map<K,V> map1, java.util.Map<K,V> map2)Checks whether one map is a sub-map of the other.booleanisTransitive()booleanisValidate()DependencyDescriptormediate(DependencyDescriptor dd)voidregister(ModuleRevisionId mrid, VisitNode node)voidregister(VisitNode node)(package private) voidreplaceNode(ModuleRevisionId mrid, IvyNode node, java.lang.String rootModuleConf)Updates the visit data currently associated with the given mrid with the given node and the visit nodes of the old visitData for the given rootModuleConfvoidsetCurrentResolvedModuleRevision(ResolvedModuleRevision mr)Sets the lastResolvedModuleRevisionwhich has been currently resolved.(package private) voidsetCurrentVisitNode(VisitNode currentVisitNode)Sets the currently visited node.voidsetReport(ConfigurationResolveReport report)
-
-
-
Field Detail
-
engine
private ResolveEngine engine
-
visitData
private java.util.Map<ModuleRevisionId,VisitData> visitData
-
report
private ConfigurationResolveReport report
-
options
private ResolveOptions options
-
currentVisitNode
private VisitNode currentVisitNode
-
currentResolvedModuleRevision
private ResolvedModuleRevision currentResolvedModuleRevision
-
-
Constructor Detail
-
ResolveData
public ResolveData(ResolveData data, boolean validate)
-
ResolveData
public ResolveData(ResolveEngine engine, ResolveOptions options)
-
ResolveData
public ResolveData(ResolveEngine engine, ResolveOptions options, ConfigurationResolveReport report)
-
ResolveData
public ResolveData(ResolveEngine engine, ResolveOptions options, ConfigurationResolveReport report, java.util.Map<ModuleRevisionId,VisitData> visitData)
-
-
Method Detail
-
getReport
public ConfigurationResolveReport getReport()
-
getNode
public IvyNode getNode(ModuleRevisionId mrid)
-
getNodes
public java.util.Collection<IvyNode> getNodes()
-
getNodeIds
public java.util.Collection<ModuleRevisionId> getNodeIds()
-
getVisitData
public VisitData getVisitData(ModuleRevisionId mrid)
-
isSubMap
private static <K,V> boolean isSubMap(java.util.Map<K,V> map1, java.util.Map<K,V> map2)Checks whether one map is a sub-map of the other.
-
isEqual
private static boolean isEqual(java.lang.Object obj1, java.lang.Object obj2)
-
getCurrentVisitNode
public VisitNode getCurrentVisitNode()
Returns the VisitNode currently visited, ornullif there is no node currently visited in this context.- Returns:
- the VisitNode currently visited
-
setCurrentVisitNode
void setCurrentVisitNode(VisitNode currentVisitNode)
Sets the currently visited node. WARNING: This should only be called by Ivy core ResolveEngine!- Parameters:
currentVisitNode- VisitNode
-
register
public void register(VisitNode node)
-
register
public void register(ModuleRevisionId mrid, VisitNode node)
-
replaceNode
void replaceNode(ModuleRevisionId mrid, IvyNode node, java.lang.String rootModuleConf)
Updates the visit data currently associated with the given mrid with the given node and the visit nodes of the old visitData for the given rootModuleConf- Parameters:
mrid- the module revision id for which the update should be donenode- the IvyNode to associate with the visit data to updaterootModuleConf- the root module configuration in which the update is made
-
setReport
public void setReport(ConfigurationResolveReport report)
-
getDate
public java.util.Date getDate()
-
isValidate
public boolean isValidate()
-
isTransitive
public boolean isTransitive()
-
getOptions
public ResolveOptions getOptions()
-
getSettings
public ResolveEngineSettings getSettings()
-
getEventManager
public EventManager getEventManager()
-
getEngine
public ResolveEngine getEngine()
-
blacklist
void blacklist(IvyNode node)
-
isBlacklisted
public boolean isBlacklisted(java.lang.String rootModuleConf, ModuleRevisionId mrid)
-
mediate
public DependencyDescriptor mediate(DependencyDescriptor dd)
-
setCurrentResolvedModuleRevision
public void setCurrentResolvedModuleRevision(ResolvedModuleRevision mr)
Sets the lastResolvedModuleRevisionwhich has been currently resolved.This can be used especially in dependency resolvers, to know if another dependency resolver has already resolved the requested dependency, to take a decision if the resolver should try to resolve it by itself or not. Indeed, the dependency resolver is responsible for taking this decision, even when included in a chain. The chain responsibility is only to set this current resolved module revision to enable the resolver to take the decision.
- Parameters:
mr- the lastResolvedModuleRevisionwhich has been currently resolved.
-
getCurrentResolvedModuleRevision
public ResolvedModuleRevision getCurrentResolvedModuleRevision()
Returns the lastResolvedModuleRevisionwhich has been currently resolved.It can be
null.- Returns:
- the last
ResolvedModuleRevisionwhich has been currently resolved.
-
-