|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.env.WhichClass
Class finding service.
This effectively replaces all Class.forName() calls in this package. Similar to code in javax.xml.*.FactoryFinder. Options included for future use; they could specify something like LOCAL_CLASSLOADER_ONLY for servlet environments, etc.
This class detects JDKs 1.1.x versus 1.2+ and may attempt to either use the current classLoader or may use a contextClassLoader. Note that in some servlet environments or in IDE environments like Eclipse that the difference between classloaders is very important! Changes in the JAXP FactoryFinder classes should be actively evaluated for inclusion/copying here.
Constructor Summary | |
WhichClass()
|
Method Summary | |
static java.lang.Class |
findClass(java.lang.String className,
java.lang.String options)
Worker method to load a class. |
protected static java.lang.ClassLoader |
findClassLoader(java.lang.String options)
Worker method to figure out which ClassLoader to use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WhichClass()
Method Detail |
public static java.lang.Class findClass(java.lang.String className, java.lang.String options) throws java.lang.ClassNotFoundException
className
- name of class to load from
an appropriate classLoaderoptions
- currently unused
java.lang.ClassNotFoundException
protected static java.lang.ClassLoader findClassLoader(java.lang.String options) throws java.lang.ClassNotFoundException
options
- currently unused
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |