public static final class ConflictResolver.ConflictItem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) Artifact |
artifact |
(package private) int |
depth |
(package private) DependencyNode |
node |
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.
|
(package private) int |
optionalities |
(package private) java.util.List<DependencyNode> |
parent |
(package private) java.lang.Object |
scopes |
Constructor and Description |
---|
ConflictItem(DependencyNode parent,
DependencyNode node,
int depth,
int optionalities,
java.lang.String... scopes)
Creates a new conflict item with the specified properties.
|
ConflictItem(DependencyNode parent,
DependencyNode node,
java.lang.String scope,
boolean optional) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addOptional(boolean optional) |
(package private) void |
addScope(java.lang.String scope) |
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.
|
java.util.Collection<java.lang.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.
|
java.lang.String |
toString() |
final java.util.List<DependencyNode> parent
final Artifact artifact
final DependencyNode node
int depth
java.lang.Object scopes
int optionalities
public static final int OPTIONAL_FALSE
public static final int OPTIONAL_TRUE
ConflictItem(DependencyNode parent, DependencyNode node, java.lang.String scope, boolean optional)
public ConflictItem(DependencyNode parent, DependencyNode node, int depth, int optionalities, java.lang.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 java.util.Collection<java.lang.String> getScopes()
null
.ConflictResolver.ScopeDeriver
void addScope(java.lang.String scope)
public int getOptionalities()
OPTIONAL_FALSE
and/or
OPTIONAL_TRUE
indicating the derived optionalities the
dependency was encountered with.void addOptional(boolean optional)
public java.lang.String toString()
toString
in class java.lang.Object