cz.cuni.amis.pogamut.sposh.dbg.engine
Class EvaluationListener

Package class diagram package EvaluationListener
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.dbg.engine.EvaluationListener
All Implemented Interfaces:
EventListener, org.netbeans.api.debugger.jpda.event.JPDABreakpointListener

public abstract class EvaluationListener
extends Object
implements org.netbeans.api.debugger.jpda.event.JPDABreakpointListener

Useful abstarct class extending JPDABreakpointListener that includes various useful methods used by the Dash.

Author:
HonzaH

Constructor Summary
EvaluationListener()
           
 
Method Summary
protected  String callStringMethod(org.netbeans.api.debugger.jpda.JPDADebugger debugger, org.netbeans.api.debugger.jpda.This thisVar, org.netbeans.api.debugger.jpda.JPDAThread thread, String methodName)
          Call some method in the debuggee that is without parameters and returns a string.
protected  org.netbeans.api.debugger.jpda.MethodBreakpoint createSelfRemoveBreakpoint(String stateClass, String methodName, int breakpointType)
          Create new java breakpoint in the class of action primitive
 String getDisplayName(org.netbeans.api.debugger.jpda.JPDADebugger debugger, EngineThread thread)
          Get name for this lap engine, create it from the session and thread names.
static org.netbeans.api.debugger.Session getSession(org.netbeans.api.debugger.jpda.JPDADebugger debugger)
          Get session that is using passed debugger.
 org.netbeans.api.debugger.jpda.This getThisVariable(org.netbeans.api.debugger.jpda.JPDAThread thread)
           
protected  void setCurrentThread(org.netbeans.api.debugger.jpda.JPDADebugger dbg, org.netbeans.api.debugger.jpda.JPDAThread thread)
          Set some thread to be current, but w/o firing property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.netbeans.api.debugger.jpda.event.JPDABreakpointListener
breakpointReached
 

Constructor Detail

EvaluationListener

public EvaluationListener()
Method Detail

getDisplayName

public final String getDisplayName(org.netbeans.api.debugger.jpda.JPDADebugger debugger,
                                   EngineThread thread)
Get name for this lap engine, create it from the session and thread names. It is in form thread_session_nam '/' (thread_name % " logic")

Parameters:
debugger - Debugger where the engine is being debugged
thread - Thread where the engine is running.
Returns:
assembled name

getThisVariable

public final org.netbeans.api.debugger.jpda.This getThisVariable(org.netbeans.api.debugger.jpda.JPDAThread thread)
                                                          throws com.sun.jdi.AbsentInformationException
Returns:
this variable of the JPDA thread.
Throws:
com.sun.jdi.AbsentInformationException

getSession

public static org.netbeans.api.debugger.Session getSession(org.netbeans.api.debugger.jpda.JPDADebugger debugger)
Get session that is using passed debugger.

Returns:
found session
Throws:
NoSuchElementException - if unable to find session for the debugger

setCurrentThread

protected final void setCurrentThread(org.netbeans.api.debugger.jpda.JPDADebugger dbg,
                                      org.netbeans.api.debugger.jpda.JPDAThread thread)
Set some thread to be current, but w/o firing property. If the property would be fired, the editor would focus on the frame of the current thread.


callStringMethod

protected final String callStringMethod(org.netbeans.api.debugger.jpda.JPDADebugger debugger,
                                        org.netbeans.api.debugger.jpda.This thisVar,
                                        org.netbeans.api.debugger.jpda.JPDAThread thread,
                                        String methodName)
                                 throws NoSuchMethodException,
                                        org.netbeans.api.debugger.jpda.InvalidExpressionException
Call some method in the debuggee that is without parameters and returns a string.

Throws:
NoSuchMethodException
org.netbeans.api.debugger.jpda.InvalidExpressionException

createSelfRemoveBreakpoint

protected final org.netbeans.api.debugger.jpda.MethodBreakpoint createSelfRemoveBreakpoint(String stateClass,
                                                                                           String methodName,
                                                                                           int breakpointType)
Create new java breakpoint in the class of action primitive

Parameters:
stateClass - FQN of primitive state class
breakpointType - Type of breakpoint, either MethodBreakpoint.TYPE_METHOD_ENTRY or MethodBreakpoint.TYPE_METHOD_EXIT.


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.