|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy
edu.rice.cs.cunit.instrumentors.delay.CallOnThreadStartStrategy
public class CallOnThreadStartStrategy
Instrumentation strategy that adds code to java.lang.Thread.start to call a static void method without parameters.
Field Summary | |
---|---|
protected java.lang.String |
_className
Name of the class containing the method to be called. |
protected java.lang.String |
_methodName
Name of the method to be called. |
protected java.lang.String |
_varClassName
Name of the class containing the enabled flag. |
protected java.lang.String |
_varName
Name of the enabled flag. |
Fields inherited from class edu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy |
---|
_afterOpcodePredicate, _beforeOpcodePredicate, _classPredicate, _methodPredicate, OPCODE_NEVER |
Constructor Summary | |
---|---|
CallOnThreadStartStrategy(java.lang.String className,
java.lang.String methodName,
java.lang.String varClassName,
java.lang.String varName)
Create a new strategy. |
Method Summary | |
---|---|
boolean |
insertEndOfMethod(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter)
Insert instructions at the end of the method. |
void |
insertInstructionsAfter(ClassFile cf,
MethodInfo mi,
InstructionList il)
Insert instructions after. |
void |
insertInstructionsBefore(ClassFile cf,
MethodInfo mi,
InstructionList il)
Add instructions to call SyncPointBuffer.delayThreadStart. |
void |
modifyStackAndLocals(ClassFile cf,
MethodInfo mi,
InstructionList il,
boolean insertBefore,
boolean insertAfter,
boolean insertEndOfMethod)
Modify the stack size and number of local variables so that the added instructions can execute. |
Methods inherited from class edu.rice.cs.cunit.instrumentors.util.AInsertAtOpcodeStrategy |
---|
done, instrument |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String _className
protected java.lang.String _methodName
protected java.lang.String _varClassName
protected java.lang.String _varName
Constructor Detail |
---|
public CallOnThreadStartStrategy(java.lang.String className, java.lang.String methodName, java.lang.String varClassName, java.lang.String varName)
className
- name of the class containing the method to be calledmethodName
- name of the method to be calledvarClassName
- name of the class containing the enabled flagvarName
- name of the enabled flagMethod Detail |
---|
public void insertInstructionsBefore(ClassFile cf, MethodInfo mi, InstructionList il)
insertInstructionsBefore
in class AInsertAtOpcodeStrategy
cf
- class filemi
- method informationil
- instruction listpublic void insertInstructionsAfter(ClassFile cf, MethodInfo mi, InstructionList il)
insertInstructionsAfter
in class AInsertAtOpcodeStrategy
cf
- class filemi
- method informationil
- instruction listpublic boolean insertEndOfMethod(ClassFile cf, MethodInfo mi, InstructionList il, boolean insertBefore, boolean insertAfter)
insertEndOfMethod
in class AInsertAtOpcodeStrategy
cf
- class filemi
- method informationil
- instruction listinsertBefore
- true if code was inserted before an opcodeinsertAfter
- true if code was inserted after an opcode
public void modifyStackAndLocals(ClassFile cf, MethodInfo mi, InstructionList il, boolean insertBefore, boolean insertAfter, boolean insertEndOfMethod)
modifyStackAndLocals
in class AInsertAtOpcodeStrategy
cf
- class filemi
- method informationil
- instruction listinsertBefore
- true if code was inserted before an opcodeinsertAfter
- true if code was inserted after an opcodeinsertEndOfMethod
- true if code was inserted at the end of the method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |