Class ClasspathJarDuplicateClassFinder
- java.lang.Object
-
- com.atlassian.confluence.util.classpath.ClasspathJarDuplicateClassFinder
-
- All Implemented Interfaces:
DuplicateClassFinder
public class ClasspathJarDuplicateClassFinder extends Object implements DuplicateClassFinder
Finds duplicate classes in JARs in the classpath of the thread context classloader.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.collections.Predicate
EXCLUDE_KNOWN_DUPLICATES
static Set<String>
KNOWN_DUPLICATE_CLASSES
static List<String>
KNOWN_DUPLICATE_PACKAGES
A list of prefixes of class file paths to exclude.
-
Constructor Summary
Constructors Constructor Description ClasspathJarDuplicateClassFinder()
ClasspathJarDuplicateClassFinder(org.apache.commons.collections.Predicate classFileNamePredicate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedSet<String>
getClassFileNames(JarSet jars)
SortedSet<String>
getClassNames(JarSet jars)
Set<JarSet>
getJarSetsWithCommonClasses()
SortedSet<String>
getPackageNames(JarSet jars)
static boolean
isKnownDuplicate(String classFileName)
-
-
-
Field Detail
-
KNOWN_DUPLICATE_PACKAGES
public static final List<String> KNOWN_DUPLICATE_PACKAGES
A list of prefixes of class file paths to exclude. For example, "javax/transaction/" will exclude everything in the javax.transaction package and all subpackages too.
-
EXCLUDE_KNOWN_DUPLICATES
public static final org.apache.commons.collections.Predicate EXCLUDE_KNOWN_DUPLICATES
-
-
Method Detail
-
getJarSetsWithCommonClasses
public Set<JarSet> getJarSetsWithCommonClasses()
- Specified by:
getJarSetsWithCommonClasses
in interfaceDuplicateClassFinder
-
getClassFileNames
public SortedSet<String> getClassFileNames(JarSet jars)
- Specified by:
getClassFileNames
in interfaceDuplicateClassFinder
-
getPackageNames
public SortedSet<String> getPackageNames(JarSet jars)
- Specified by:
getPackageNames
in interfaceDuplicateClassFinder
-
getClassNames
public SortedSet<String> getClassNames(JarSet jars)
- Specified by:
getClassNames
in interfaceDuplicateClassFinder
-
isKnownDuplicate
public static boolean isKnownDuplicate(String classFileName)
-
-