Class ChainedDependencyGraphTransformer
- java.lang.Object
-
- org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer
-
- All Implemented Interfaces:
DependencyGraphTransformer
public final class ChainedDependencyGraphTransformer extends java.lang.Object implements DependencyGraphTransformer
A dependency graph transformer that chains other transformers.
-
-
Field Summary
Fields Modifier and Type Field Description private DependencyGraphTransformer[]transformers
-
Constructor Summary
Constructors Constructor Description ChainedDependencyGraphTransformer(DependencyGraphTransformer... transformers)Creates a new transformer that chains the specified transformers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DependencyGraphTransformernewInstance(DependencyGraphTransformer transformer1, DependencyGraphTransformer transformer2)Creates a new transformer that chains the specified transformers or simply returns one of them if the other one isnull.DependencyNodetransformGraph(DependencyNode node, DependencyGraphTransformationContext context)Transforms the dependency graph denoted by the specified root node.
-
-
-
Field Detail
-
transformers
private final DependencyGraphTransformer[] transformers
-
-
Constructor Detail
-
ChainedDependencyGraphTransformer
public ChainedDependencyGraphTransformer(DependencyGraphTransformer... transformers)
Creates a new transformer that chains the specified transformers.- Parameters:
transformers- The transformers to chain, may benullor empty.
-
-
Method Detail
-
newInstance
public static DependencyGraphTransformer newInstance(DependencyGraphTransformer transformer1, DependencyGraphTransformer transformer2)
Creates a new transformer that chains the specified transformers or simply returns one of them if the other one isnull.- Parameters:
transformer1- The first transformer of the chain, may benull.transformer2- The second transformer of the chain, may benull.- Returns:
- The chained transformer or
nullif both input transformers arenull.
-
transformGraph
public DependencyNode transformGraph(DependencyNode node, DependencyGraphTransformationContext context) throws RepositoryException
Description copied from interface:DependencyGraphTransformerTransforms the dependency graph denoted by the specified root node. The transformer may directly change the provided input graph or create a new graph, the former is recommended for performance reasons.- Specified by:
transformGraphin interfaceDependencyGraphTransformer- Parameters:
node- The root node of the (possibly cyclic!) graph to transform, must not benull.context- The graph transformation context, must not benull.- Returns:
- The result graph of the transformation, never
null. - Throws:
RepositoryException- If the transformation failed.
-
-