public static final class ConflictResolver.ConflictItem extends Object
Modifier and Type | Field and Description |
---|---|
static int |
OPTIONAL_FALSE
Bit flag indicating whether one or more paths consider the dependency non-optional.
|
static int |
OPTIONAL_TRUE
Bit flag indicating whether one or more paths consider the dependency optional.
|
Constructor and Description |
---|
ConflictItem(DependencyNode parent,
DependencyNode node,
int depth,
int optionalities,
String... scopes)
Creates a new conflict item with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
Dependency |
getDependency()
Gets the dependency involved in the conflict, short for
getNode.getDependency() . |
int |
getDepth()
Gets the zero-based depth at which the conflicting node occurs in the graph.
|
DependencyNode |
getNode()
Gets the dependency node involved in the conflict.
|
int |
getOptionalities()
Gets the derived optionalities of the dependency.
|
Collection<String> |
getScopes()
Gets the derived scopes of the dependency.
|
boolean |
isSibling(ConflictResolver.ConflictItem item)
Determines whether the specified conflict item is a sibling of this item.
|
String |
toString() |
public static final int OPTIONAL_FALSE
public static final int OPTIONAL_TRUE
public ConflictItem(DependencyNode parent, DependencyNode node, int depth, int optionalities, String... scopes)
parent
- The parent node of the conflicting dependency, may be null
.node
- The conflicting dependency, must not be null
.depth
- The zero-based depth of the conflicting dependency.optionalities
- The optionalities the dependency was encountered with, encoded as a bit field consisting
of OPTIONAL_TRUE
and
OPTIONAL_FALSE
.scopes
- The derived scopes of the conflicting dependency, must not be null
.public boolean isSibling(ConflictResolver.ConflictItem item)
item
- The other conflict item, must not be null
.true
if the given item has the same parent as this item, false
otherwise.public DependencyNode getNode()
null
.public Dependency getDependency()
getNode.getDependency()
.null
.public int getDepth()
public Collection<String> getScopes()
null
.ConflictResolver.ScopeDeriver
public int getOptionalities()
OPTIONAL_FALSE
and/or
OPTIONAL_TRUE
indicating the derived optionalities the
dependency was encountered with.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.