Package org.jrd.agent
Class InstrumentationProvider
- java.lang.Object
-
- org.jrd.agent.InstrumentationProvider
-
public class InstrumentationProvider extends Object
This class stores instrumentation and transformer objects and handles the transformation, retrieval of bytecode and class names.- Author:
- pmikova
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
findClassBody(String className)
Finds class object corresponding to the class name and returns its bytecode.void
getClassesNames(LinkedBlockingQueue<String> queue, Boolean abort)
Inserts names of classes into queue.void
setClassBody(String cname, byte[] nwBody)
-
-
-
Method Detail
-
setClassBody
public void setClassBody(String cname, byte[] nwBody) throws UnmodifiableClassException
- Throws:
UnmodifiableClassException
-
findClassBody
public byte[] findClassBody(String className) throws UnmodifiableClassException
Finds class object corresponding to the class name and returns its bytecode.- Parameters:
className
- name of class we want to get- Returns:
- bytecode of given class
- Throws:
UnmodifiableClassException
- if the class can not be retransformed
-
getClassesNames
public void getClassesNames(LinkedBlockingQueue<String> queue, Boolean abort) throws InterruptedException
Inserts names of classes into queue. Stops execution when it receives abort signal.- Parameters:
queue
- output queueabort
- abort signal- Throws:
InterruptedException
- interrupted exception
-
-