|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.softevo.jdynpur.eval.PurityTraceAnalyser
org.softevo.jdynpur.eval.MethodExecutionDisplayer
public class MethodExecutionDisplayer
This is a utility class used to analyze execution of specific methods. It expects a classname and one or more trace files as input and displays recorded events only when the specified method is executed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.softevo.jdynpur.eval.PurityTraceAnalyser |
---|
PurityTraceAnalyser.ParameterMutabilityInformation |
Field Summary | |
---|---|
protected org.softevo.util.asm.MethodIdentifier |
identifier
The method identifier of the method to be displayed. |
protected int |
numberOfRunningMethods
The number of times the method is currently active. |
protected int |
soughtMethodId
The integer identifying the sought method. |
Constructor Summary | |
---|---|
MethodExecutionDisplayer(java.lang.String fileName,
org.softevo.util.asm.MethodIdentifier identifier)
Creates a new method execution displayer. |
Method Summary | |
---|---|
protected void |
handleArrayCreation(int objectId,
int threadId)
If the sought method is active, this method outputs an array creation message on System.out . |
protected void |
handleArrayModification(int objectId,
int threadId)
If the sought method is active, this method outputs an array modification message on System.out . |
protected void |
handleFieldWrite(int objectId,
int threadId)
If the sought method is active, this method outputs a field modification message on System.out . |
protected void |
handleMethodEnd(int methodId,
int threadId,
java.lang.String className)
If a method has ended, this method checks if it's execution had side-effects and outputs a message on System.out . |
protected void |
handleMethodStart(int methodId,
int threadId,
java.lang.String className)
If the sought method is active, this method outputs a method start message on System.out and increases the active method count. |
protected void |
handleObjectCreation(int objectId,
int threadId)
If the sought method is active, this method outputs an object creation message on System.out . |
protected void |
handleStaticFieldWrite(int threadId)
If the sought method is active, this method outputs a field modification message on System.out . |
protected boolean |
isMethodRunning()
Checks if the sought method is currently executed in the trace. |
protected boolean |
isSoughtMethod(int methodId)
Checks if the identifier is for the sought method. |
static void |
main(java.lang.String[] args)
This method evaluates command line arguments and replays execution for every trace file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.softevo.util.asm.MethodIdentifier identifier
protected int soughtMethodId
protected int numberOfRunningMethods
Constructor Detail |
---|
public MethodExecutionDisplayer(java.lang.String fileName, org.softevo.util.asm.MethodIdentifier identifier)
fileName
- the name of the trace file to replayidentifierMap
- the identifier map for this traceidentifier
- the identifier of the sought methodMethod Detail |
---|
protected void handleArrayCreation(int objectId, int threadId)
System.out
.
handleArrayCreation
in class PurityTraceAnalyser
objectId
- the identifier for the new arraythreadId
- the thread idprotected void handleArrayModification(int objectId, int threadId)
System.out
.
handleArrayModification
in class PurityTraceAnalyser
objectId
- the identifier for the modified arraythreadId
- the thread idprotected void handleStaticFieldWrite(int threadId)
System.out
.
handleStaticFieldWrite
in class PurityTraceAnalyser
objectId
- the identifier for the modified fieldthreadId
- the thread idprotected void handleFieldWrite(int objectId, int threadId)
System.out
.
handleFieldWrite
in class PurityTraceAnalyser
objectId
- the identifier for the modified fieldthreadId
- the thread idprotected void handleObjectCreation(int objectId, int threadId)
System.out
.
handleObjectCreation
in class PurityTraceAnalyser
objectId
- the identifier for the new objectthreadId
- the thread idprotected void handleMethodStart(int methodId, int threadId, java.lang.String className)
System.out
and increases the active method count.
handleMethodStart
in class PurityTraceAnalyser
methodId
- the identifier for the methodthreadId
- the thread idprotected void handleMethodEnd(int methodId, int threadId, java.lang.String className)
System.out
.
handleMethodEnd
in class PurityTraceAnalyser
methodId
- the identifier for the methodthreadId
- the thread idprotected boolean isMethodRunning()
protected boolean isSoughtMethod(int methodId)
methodId
- the id of the methodpublic static void main(java.lang.String[] args) throws java.io.IOException
args
- command line arguments
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |