1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.jadira.dependencynavigator.model;
19
20 import org.apache.maven.model.Dependency;
21
22 import java.util.Collections;
23 import java.util.List;
24
25 public class LeafDependency extends Artifact {
26 public LeafDependency(Artifact parent, Dependency dependency, String scope) throws ArtifactInitialisationException {
27 super(parent, dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), scope);
28 }
29
30 @Override
31 public boolean isLeaf() {
32 return true;
33 }
34
35 @Override
36 public List<Artifact> getDependencies() {
37 return Collections.emptyList();
38 }
39
40 @Override
41 public int dependencyCount() {
42 return 1;
43 }
44 }