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 java.lang.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 java.util.Set<java.lang.String> KNOWN_DUPLICATE_CLASSES
           
static java.util.List<java.lang.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
 java.util.SortedSet<java.lang.String> getClassFileNames(JarSet jars)
           
 java.util.SortedSet<java.lang.String> getClassNames(JarSet jars)
           
 java.util.Set<JarSet> getJarSetsWithCommonClasses()
           
 java.util.SortedSet<java.lang.String> getPackageNames(JarSet jars)
           
static boolean isKnownDuplicate(java.lang.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 java.util.List<java.lang.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 java.util.Set<java.lang.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 java.util.Set<JarSet> getJarSetsWithCommonClasses()
Specified by:
getJarSetsWithCommonClasses in interface DuplicateClassFinder

getClassFileNames

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

getPackageNames

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

getClassNames

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

isKnownDuplicate

public static boolean isKnownDuplicate(java.lang.String classFileName)


Copyright © 2003-2014 Atlassian. All Rights Reserved.