Class ChainedDependencyGraphTransformer

java.lang.Object
org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer
All Implemented Interfaces:
DependencyGraphTransformer

public final class ChainedDependencyGraphTransformer extends Object implements DependencyGraphTransformer
A dependency graph transformer that chains other transformers.
  • Field Details

  • Constructor Details

    • ChainedDependencyGraphTransformer

      public ChainedDependencyGraphTransformer(DependencyGraphTransformer... transformers)
      Creates a new transformer that chains the specified transformers.
      Parameters:
      transformers - The transformers to chain, may be null or empty.
  • Method Details

    • 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 is null.
      Parameters:
      transformer1 - The first transformer of the chain, may be null.
      transformer2 - The second transformer of the chain, may be null.
      Returns:
      The chained transformer or null if both input transformers are null.
    • transformGraph

      Description copied from interface: DependencyGraphTransformer
      Transforms 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:
      transformGraph in interface DependencyGraphTransformer
      Parameters:
      node - The root node of the (possibly cyclic!) graph to transform, must not be null.
      context - The graph transformation context, must not be null.
      Returns:
      The result graph of the transformation, never null.
      Throws:
      RepositoryException - If the transformation failed.