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 DuplicateClassFinderpublic SortedSet<String> getClassFileNames(JarSet jars)
The set is sorted by the natural order of the contents: the String class file names.
getClassFileNames in interface DuplicateClassFinderjars - 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 DuplicateClassFinderjars - a set of one or more JARs on the classpathpublic SortedSet<String> getClassNames(JarSet jars)
getClassNames in interface DuplicateClassFinderCopyright © 2003–2022 Atlassian. All rights reserved.