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.List KNOWN_DUPLICATES
          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 getClassFileNames(JarSet jars)
           
 java.util.Set getJarSetsWithCommonClasses()
           
 java.util.SortedSet 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_DUPLICATES

public static final java.util.List KNOWN_DUPLICATES
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
Constructor Detail

ClasspathJarDuplicateClassFinder

public ClasspathJarDuplicateClassFinder()

ClasspathJarDuplicateClassFinder

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

getJarSetsWithCommonClasses

public java.util.Set getJarSetsWithCommonClasses()
Specified by:
getJarSetsWithCommonClasses in interface DuplicateClassFinder

getClassFileNames

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

getPackageNames

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

isKnownDuplicate

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


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.