com.atlassian.confluence.util.classpath
Class ClasspathJarDuplicateClassFinder

java.lang.Object
  extended by 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
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
ClasspathJarDuplicateClassFinder()
           
ClasspathJarDuplicateClassFinder(org.apache.commons.collections.Predicate classFileNamePredicate)
           
 
Method Summary
 SortedSet<String> getClassFileNames(JarSet jars)
           
 SortedSet<String> getClassNames(JarSet jars)
           
 Set<JarSet> getJarSetsWithCommonClasses()
           
 SortedSet<String> getPackageNames(JarSet jars)
           
static boolean isKnownDuplicate(String classFileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


KNOWN_DUPLICATE_CLASSES

public static final Set<String> KNOWN_DUPLICATE_CLASSES

EXCLUDE_KNOWN_DUPLICATES

public static final org.apache.commons.collections.Predicate EXCLUDE_KNOWN_DUPLICATES
Constructor Detail

ClasspathJarDuplicateClassFinder

public ClasspathJarDuplicateClassFinder()

ClasspathJarDuplicateClassFinder

public ClasspathJarDuplicateClassFinder(org.apache.commons.collections.Predicate classFileNamePredicate)
Method Detail

getJarSetsWithCommonClasses

public Set<JarSet> getJarSetsWithCommonClasses()
Specified by:
getJarSetsWithCommonClasses in interface DuplicateClassFinder

getClassFileNames

public SortedSet<String> getClassFileNames(JarSet jars)
Specified by:
getClassFileNames in interface DuplicateClassFinder

getPackageNames

public SortedSet<String> getPackageNames(JarSet jars)
Specified by:
getPackageNames in interface DuplicateClassFinder

getClassNames

public SortedSet<String> getClassNames(JarSet jars)
Specified by:
getClassNames in interface DuplicateClassFinder

isKnownDuplicate

public static boolean isKnownDuplicate(String classFileName)


Copyright © 2003-2013 Atlassian. All Rights Reserved.