1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.aether.internal.impl.collect.bf;
20
21 import java.util.List;
22
23 import org.eclipse.aether.RequestTrace;
24 import org.eclipse.aether.collection.DependencyManager;
25 import org.eclipse.aether.collection.DependencySelector;
26 import org.eclipse.aether.collection.DependencyTraverser;
27 import org.eclipse.aether.collection.VersionFilter;
28 import org.eclipse.aether.graph.Dependency;
29 import org.eclipse.aether.graph.DependencyNode;
30 import org.eclipse.aether.internal.impl.collect.PremanagedDependency;
31 import org.eclipse.aether.repository.RemoteRepository;
32
33
34
35
36
37
38 final class DependencyProcessingContext {
39 final DependencySelector depSelector;
40 final DependencyManager depManager;
41 final DependencyTraverser depTraverser;
42 final VersionFilter verFilter;
43 final List<RemoteRepository> repositories;
44 final List<Dependency> managedDependencies;
45
46
47
48
49 final List<DependencyNode> parents;
50
51 final PremanagedDependency premanagedDependency;
52 final RequestTrace trace;
53 Dependency dependency;
54
55 @SuppressWarnings("checkstyle:parameternumber")
56 DependencyProcessingContext(
57 DependencySelector depSelector,
58 DependencyManager depManager,
59 DependencyTraverser depTraverser,
60 VersionFilter verFilter,
61 RequestTrace trace,
62 List<RemoteRepository> repositories,
63 List<Dependency> managedDependencies,
64 List<DependencyNode> parents,
65 Dependency dependency,
66 PremanagedDependency premanagedDependency) {
67 this.depSelector = depSelector;
68 this.depManager = depManager;
69 this.depTraverser = depTraverser;
70 this.verFilter = verFilter;
71 this.trace = trace;
72 this.repositories = repositories;
73 this.dependency = dependency;
74 this.premanagedDependency = premanagedDependency;
75 this.managedDependencies = managedDependencies;
76 this.parents = parents;
77 }
78
79 DependencyProcessingContext withDependency(Dependency dependency) {
80 this.dependency = dependency;
81 return this;
82 }
83
84 DependencyProcessingContext copy() {
85 return new DependencyProcessingContext(
86 depSelector,
87 depManager,
88 depTraverser,
89 verFilter,
90 trace,
91 repositories,
92 managedDependencies,
93 parents,
94 dependency,
95 premanagedDependency);
96 }
97
98 DependencyNode getParent() {
99 return parents.get(parents.size() - 1);
100 }
101 }