|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.imagej.patcher.LegacyInjector
public class LegacyInjector
Overrides class behavior of ImageJ1 classes using bytecode manipulation. This
class uses the CodeHacker (which uses Javassist) to inject method
hooks, which are implemented in the net.imagej.patcher package.
| Constructor Summary | |
|---|---|
LegacyInjector()
|
|
| Method Summary | |
|---|---|
static String |
getImageJ1Version(net.imagej.patcher.CodeHacker hacker)
Determines the ImageJ 1.x version without loading the ImageJ 1.x classes. |
void |
injectHooks(ClassLoader classLoader)
Overrides class behavior of ImageJ1 classes by injecting method hooks. |
void |
injectHooks(ClassLoader classLoader,
boolean headless)
Overrides class behavior of ImageJ1 classes by injecting method hooks. |
static LegacyHooks |
installHooks(ClassLoader classLoader,
LegacyHooks hooks)
|
static boolean |
isImageJ1VersionAtLeast(net.imagej.patcher.CodeHacker hacker,
String minimalVersion)
|
static void |
preinit()
|
static void |
preinit(ClassLoader classLoader)
|
static void |
writeJar(File outputJar,
boolean headless,
boolean fullIJJar)
Writes a .jar file with the patched classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LegacyInjector()
| Method Detail |
|---|
public void injectHooks(ClassLoader classLoader)
classLoader - the class loader into which to load the patched classespublic static String getImageJ1Version(net.imagej.patcher.CodeHacker hacker)
hacker - the CodeHacker instance to use
public static boolean isImageJ1VersionAtLeast(net.imagej.patcher.CodeHacker hacker,
String minimalVersion)
public void injectHooks(ClassLoader classLoader,
boolean headless)
classLoader - the class loader into which to load the patched classesheadless - whether to include headless patches
public static void writeJar(File outputJar,
boolean headless,
boolean fullIJJar)
throws ClassNotFoundException,
IOException,
NotFoundException
outputJar - the .jar file to write toheadless - whether to include the headless patchesfullIJJar - whether to include unpatched ImageJ 1.x classes and
resources, too
ClassNotFoundException
IOException
NotFoundExceptionpublic static void preinit()
public static void preinit(ClassLoader classLoader)
public static LegacyHooks installHooks(ClassLoader classLoader,
LegacyHooks hooks)
throws UnsupportedOperationException
UnsupportedOperationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||