public class ClasspathJarSets extends Object implements DuplicateClassFinder
Ideally, a set of JARs for a given class should only include one JAR; if the set of JARs for a given class includes more than one JAR, the class is duplicated in several JARs in the classpath.
Constructor and Description |
---|
ClasspathJarSets() |
ClasspathJarSets(ClasspathClasses classpathClasses) |
ClasspathJarSets(ClasspathClasses classpathClasses,
org.apache.commons.collections.Predicate classFileNamePredicate) |
Modifier and Type | Method and Description |
---|---|
void |
addClass(String classFileName,
JarSet jars) |
SortedSet<String> |
getClassFileNames(JarSet jars)
Returns the class files in a given set of JARs, which may be one or more JARs.
|
SortedSet<String> |
getClassNames(JarSet jars) |
Set<JarSet> |
getJarSetsWithCommonClasses() |
SortedSet<String> |
getPackageNames(JarSet jars)
Returns the packages in a given set of JARs, which may be one or more JARs.
|
public ClasspathJarSets()
public ClasspathJarSets(ClasspathClasses classpathClasses)
public ClasspathJarSets(ClasspathClasses classpathClasses, org.apache.commons.collections.Predicate classFileNamePredicate)
public Set<JarSet> getJarSetsWithCommonClasses()
getJarSetsWithCommonClasses
in interface DuplicateClassFinder
public SortedSet<String> getClassFileNames(JarSet jars)
The set is sorted by the natural order of the contents: the String class file names.
getClassFileNames
in interface DuplicateClassFinder
jars
- a set of one or more JARs on the classpathpublic SortedSet<String> getPackageNames(JarSet jars)
The set is sorted by the natural order of the contents: the String package names.
getPackageNames
in interface DuplicateClassFinder
jars
- a set of one or more JARs on the classpathpublic SortedSet<String> getClassNames(JarSet jars)
getClassNames
in interface DuplicateClassFinder
Copyright © 2003–2020 Atlassian. All rights reserved.