alt.jiapi.agent
Class InstrumentationAgent
java.lang.Object
alt.jiapi.agent.InstrumentationAgent
- All Implemented Interfaces:
- java.lang.instrument.ClassFileTransformer
public class InstrumentationAgent
- extends java.lang.Object
- implements java.lang.instrument.ClassFileTransformer
This class is an implementation of ClassFileTransformer and
acts as a java-agent for jdk1.5+ virtual machines.
You can enable this agent from command line by adding -javaagent
switch to command line like this:
java -javaagent: HelloWorld
One can give configuration parameters in command line to this agent
and Transformer used. Parameters are given by appending the following
to -javaagent switch:
'=name1=value1,name2=value2,....'
This agent regoqnises one parameter:
'transformer=. If this parameter is given,
It is assumed to be a fully qualified name of a class, that extends
alt.jiapi.agent.Transformer. If not given,
alt.jiapi.agent.HotSpotTransformer is used.
- See Also:
Transformer
,
HotSpotTransformer
Method Summary |
static void |
premain(java.lang.String agentArgs,
java.lang.instrument.Instrumentation i)
|
byte[] |
transform(java.lang.ClassLoader cl,
java.lang.String className,
java.lang.Class classBeingRedefined,
java.security.ProtectionDomain pd,
byte[] classFileBuffer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstrumentationAgent
public InstrumentationAgent(java.lang.String agentArgs,
java.lang.instrument.Instrumentation i,
Transformer transformer)
premain
public static void premain(java.lang.String agentArgs,
java.lang.instrument.Instrumentation i)
transform
public byte[] transform(java.lang.ClassLoader cl,
java.lang.String className,
java.lang.Class classBeingRedefined,
java.security.ProtectionDomain pd,
byte[] classFileBuffer)
- Specified by:
transform
in interface java.lang.instrument.ClassFileTransformer
Copyright © 2001. Documenation generated August 26 2011.