public abstract class ClassLoaderResolver
extends java.lang.Object
ResourceLoader,
IClassLoadStrategy,
DefaultClassLoadStrategy| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.Class |
getCallerClass(int callerOffset) |
static java.lang.ClassLoader |
getClassLoader()
This method selects the "best" classloader instance to be used for
class/resource loading by whoever calls this method.
|
static java.lang.ClassLoader |
getClassLoader(java.lang.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(java.lang.ClassLoader loader1,
java.lang.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 java.lang.ClassLoader getClassLoader(java.lang.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 java.lang.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 java.lang.Class getCallerClass(int callerOffset)
public static boolean isChild(java.lang.ClassLoader loader1,
java.lang.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.