3 回答

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊
ClassA.class
ClassB.class
ClassB
ClassA
ClassLoaderC
ClassLoaderD
Thread.currentThread().getContextClassLoader()

TA貢獻(xiàn)1788條經(jīng)驗(yàn) 獲得超4個(gè)贊
ContextClassLoader
getClass().getClassLoader()
ClassLoader
getClass().getClassLoader()
ClassLoader
getClass().getClassLoader()
.
Thread.getContextClassLoader()
, sun.misc.VM.latestUserDefinedLoader()
sun.reflect.Reflection.getCallerClass()
Thread.getContextClassLoader()
ObjectInputStream
ClassLoader
ContextClassLoader
ContextClassLoader null
CLASSPATH
ContextClassLoader
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); // call some API that uses reflection without taking ClassLoader param} finally { Thread.currentThread().setContextClassLoader(originalClassLoader);}
添加回答
舉報(bào)