public abstract class ClassLoaderResolver extends Object
ResourceLoader,
IClassLoadStrategy,
DefaultClassLoadStrategy| 限定符和类型 | 方法和说明 |
|---|---|
static Class |
getCallerClass(int callerOffset) |
static ClassLoader |
getClassLoader()
This method selects the "best" classloader instance to be used for
class/resource loading by whoever calls this method.
|
static ClassLoader |
getClassLoader(Class caller)
This method selects the "best" classloader instance to be used for
class/resource loading by whoever calls this method.
|
static IClassLoadStrategy |
getStrategy()
Gets the current classloader selection strategy setting.
|
static boolean |
isChild(ClassLoader loader1,
ClassLoader loader2)
Returns 'true' if 'loader2' is a delegation child of 'loader1' [or if
'loader1'=='loader2'].
|
static IClassLoadStrategy |
setStrategy(IClassLoadStrategy strategy)
Sets the classloader selection strategy to be used by subsequent calls
to
getClassLoader(). |
public static ClassLoader getClassLoader(Class caller)
IClassLoadStrategy
instance established by the last call to setStrategy(com.vladium.util.IClassLoadStrategy).This method does not throw.
caller - [null input eliminates the caller's current classloader
from consideration]public static ClassLoader getClassLoader()
IClassLoadStrategy
instance established by the last call to setStrategy(com.vladium.util.IClassLoadStrategy).
This method uses its own caller to set the call context. To be able to
override this decision explicitly, use getClassLoader(Class).
This method does not throw.
public static Class getCallerClass(int callerOffset)
public static boolean isChild(ClassLoader loader1, ClassLoader loader2)
public static IClassLoadStrategy getStrategy()
public static IClassLoadStrategy setStrategy(IClassLoadStrategy strategy)
getClassLoader(). An instance of ClassLoaderResolver.DefaultClassLoadStrategy
is in effect if this method is never called.strategy - new strategy [may not be null]Copyright © 2018. All rights reserved.