org.knopflerfish.framework
public class ClassPatcherWrappers extends java.lang.Object
Each wrapper must have the exact same signature as the original method, plus one extra long argument representing the bundle id and one object argument representing the caller's context (this) The context object may be null when called from a static context
ClassPatcher
Constructor and Description |
---|
ClassPatcherWrappers() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class |
forName1Wrapper(java.lang.String name,
long bid,
java.lang.Object context)
Use bundle class loader at Class.forName(String) calls
|
static java.lang.Class |
forName3Wrapper(java.lang.String name,
boolean initialize,
java.lang.ClassLoader cl,
long bid,
java.lang.Object context)
Use bundle class loader at Class.forName(String, boolean, ClassLoader) calls.
|
protected static BundleClassLoader |
getBundleClassLoader(long bid) |
static java.lang.ClassLoader |
getSystemClassLoaderWrapper(long bid,
java.lang.Object context)
Get bundle class loader at Class.getSystemClassLoader() calls.
|
static void |
systemExitWrapper(int code,
long bid,
java.lang.Object context) |
protected static BundleClassLoader getBundleClassLoader(long bid)
public static void systemExitWrapper(int code, long bid, java.lang.Object context)
public static java.lang.ClassLoader getSystemClassLoaderWrapper(long bid, java.lang.Object context)
public static java.lang.Class forName1Wrapper(java.lang.String name, long bid, java.lang.Object context) throws java.lang.ClassNotFoundException
First, try Class.forName(String). If this fails, try the context's class loader. If this fails too, explicitly try the bundle class loader.
java.lang.ClassNotFoundException
public static java.lang.Class forName3Wrapper(java.lang.String name, boolean initialize, java.lang.ClassLoader cl, long bid, java.lang.Object context) throws java.lang.ClassNotFoundException
First, try the supplied class loader. If this failes, try the bundle class loader instead.
java.lang.ClassNotFoundException