|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.imagej.patcher.JavaAgent
public class JavaAgent
A Java agent to help with legacy issues.
| Constructor Summary | |
|---|---|
JavaAgent()
|
|
| Method Summary | |
|---|---|
static void |
dontCall(int i)
|
static void |
main(String... args)
Writes out a minimal java agent .jar file. |
static void |
premain(String agentArgs,
Instrumentation instrumentation)
The premain method started at JVM startup. |
static void |
stop()
|
byte[] |
transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaAgent()
| Method Detail |
|---|
public static void stop()
public static void premain(String agentArgs,
Instrumentation instrumentation)
agentArgs - the optional argument passed via -javaagent:ij-legacy.jar=ARGUMENTinstrumentation - the Instrumentation instance passed by the JVM
public byte[] transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
throws IllegalClassFormatException
transform in interface ClassFileTransformerIllegalClassFormatExceptionpublic static void dontCall(int i)
public static void main(String... args)
throws IOException
When trying to debug class loading issues in ij-legacy itself, of course we cannot load the complete ij-legacy.jar as a Java Agent (otherwise it would hide the classes that we want to test with possibly out-dated ones).
This main method can be used to generate a minimal .jar file for use with -javaagent that contains only the LegacyJavaAgent class.
args - the command-line arguments (the first one, if specified,
refers to the output file name)
IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||