public abstract static class ConflictResolver.ScopeDeriver extends Object
ConflictResolverthat determines the scope of a dependency in relation to the scope of its parent.
Note: Implementations must be stateless.
|Constructor and Description|
|Modifier and Type||Method and Description|
Determines the scope of a dependency in relation to the scope of its parent.
Retrieves the scope deriver for use during the specified graph transformation.
public ConflictResolver.ScopeDeriver getInstance(DependencyNode root, DependencyGraphTransformationContext context) throws RepositoryException
ConflictResolver.transformGraph(DependencyNode, DependencyGraphTransformationContext)invocation to allow implementations to prepare any auxiliary data that is needed for their operation. Given that implementations must be stateless, a new instance needs to be returned to hold such auxiliary data. The default implementation simply returns the current instance which is appropriate for implementations which do not require auxiliary data.
root- The root node of the (possibly cyclic!) graph to transform, must not be
context- The graph transformation context, must not be
RepositoryException- If the instance could not be retrieved.
public abstract void deriveScope(ConflictResolver.ScopeContext context) throws RepositoryException
ConflictResolver.ScopeContext.setDerivedScope(String)to deliver the result of their calculation. If said method is not invoked, the conflict resolver will assume the scope of the child dependency remains unchanged.
context- The scope context, must not be
RepositoryException- If the scope deriviation failed.
Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.