org.sourceforge.jemm.client.events
Interface StackTracer

All Known Implementing Classes:
EntitiesContext

public interface StackTracer

Maintains status of method entry and exit.

Author:
Paul Keeble

Method Summary
 void enterMethod(java.lang.Object entity, Descriptor method)
          Marks an method entered and tracks appropriately the current thread as entering the method on the entity.
 void exitMethod(java.lang.Object entity, Descriptor method)
          Exits a method, removing any contexts that have been created.
 boolean isEntityEntered(java.lang.Object entity)
          Determines if any thread has entered the entity.
 boolean isMethodEntered(java.lang.Object entity, Descriptor method)
          Determines if the current thread is currently in the entity and method.
 

Method Detail

enterMethod

void enterMethod(java.lang.Object entity,
                 Descriptor method)
Marks an method entered and tracks appropriately the current thread as entering the method on the entity. Calls listener.methodEntered, and if this is the first thread into the Object calls entityEntered first.

Parameters:
entity - The object entered
method - The method by which it was entered

isMethodEntered

boolean isMethodEntered(java.lang.Object entity,
                        Descriptor method)
Determines if the current thread is currently in the entity and method.

Parameters:
entity - The object
method - The method on the object
Returns:
true if the thread has previously be entered, false otherwise

isEntityEntered

boolean isEntityEntered(java.lang.Object entity)
Determines if any thread has entered the entity.

Parameters:
entity - The object to check
Returns:
True if the entity has been entered, false otherwise

exitMethod

void exitMethod(java.lang.Object entity,
                Descriptor method)
Exits a method, removing any contexts that have been created. Calls the listener.methodExit and if this is the last exit of all threads also calls entityExited

Parameters:
entity - The object being exited
method - The method from which the thread is exiting


Copyright © 2009. All Rights Reserved.