public final class ClassLoaderResolver extends Object
ResourceLoader
,
IClassLoadStrategy
,
DefaultClassLoadStrategy
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getClassLoader()
This method selects the "best" classloader instance to be used for
class/resource loading by whoever calls this method.
|
(package private) static ClassLoader |
getClassLoader(int callerOffset)
A package-private version of
getClassLoader() with adjustable
caller offset (useful for embedding this method in other library
classes in this package). |
static IClassLoadStrategy |
getStrategy()
Gets the current classloader selection strategy setting.
|
static IClassLoadStrategy |
setStrategy(IClassLoadStrategy strategy)
Sets the classloader selection strategy to be used by subsequent calls
to
getClassLoader() . |
public static ClassLoader getClassLoader()
IClassLoadStrategy
instance established by the last call to setStrategy(com.massa.util.classloader.IClassLoadStrategy)
.public static IClassLoadStrategy getStrategy()
public static IClassLoadStrategy setStrategy(IClassLoadStrategy strategy)
getClassLoader()
. An instance of DefaultClassLoadStrategy
is in effect if this method is never called.strategy
- [may not be null]static ClassLoader getClassLoader(int callerOffset)
getClassLoader()
with adjustable
caller offset (useful for embedding this method in other library
classes in this package).callerOffset
- extra call context depth offset to pass into
getCallerClass().