org.oddjob.util
Class ClassLoaderSorter
java.lang.Object
org.oddjob.util.ClassLoaderSorter
public class ClassLoaderSorter
- extends Object
A utility class that finds the highest (in the ClassLoader hierarchy)
ClassLoader for the given classes.
TODO: The current implementation assumes that all classes are in the
same ClassLoader hierarchy but doesn't validate this. It should.
- Author:
- rob
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassLoaderSorter
public ClassLoaderSorter()
getTopLoader
public ClassLoader getTopLoader(Class<?>[] forClasses)
- Find the highest required ClassLoader.
- Parameters:
forClasses
- The Classes.
- Returns:
- The highest ClassLoader, possibly the System ClassLoader,
but never null.