com.bluemarsh.jswat.command
Class whereCommand

java.lang.Object
  |
  +--com.bluemarsh.jswat.command.JSwatCommand
        |
        +--com.bluemarsh.jswat.command.whereCommand
Direct Known Subclasses:
whereiCommand

public class whereCommand
extends JSwatCommand

Defines the class that handles the 'where' command.

Author:
Nathan Fiedler

Field Summary
protected  boolean showPC
          Set to true to display program counter information in thread stack dump.
 
Fields inherited from class com.bluemarsh.jswat.command.JSwatCommand
logCategory, primitiveTypeNames, swat
 
Constructor Summary
whereCommand()
           
 
Method Summary
 void perform(Session session, com.bluemarsh.util.StringTokenizer args, Log out)
          Perform the 'where' command.
protected  void printStack(com.sun.jdi.ThreadReference thread, Log out, ContextManager ctxtMgr)
          Display the stack frames of the given thread, possibly with program counter information included.
 
Methods inherited from class com.bluemarsh.jswat.command.JSwatCommand
argumentsMatch, createObject, description, findClassesByPattern, getCommandName, getPromptString, getThreadByID, help, help, missingArgs, receiveInput, resolveOverload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

showPC

protected boolean showPC
Set to true to display program counter information in thread stack dump.
Constructor Detail

whereCommand

public whereCommand()
Method Detail

perform

public void perform(Session session,
                    com.bluemarsh.util.StringTokenizer args,
                    Log out)
Perform the 'where' command.
Overrides:
perform in class JSwatCommand
Parameters:
session - JSwat session on which to operate.
args - Tokenized string of command arguments.
out - Output to write messages to.

printStack

protected void printStack(com.sun.jdi.ThreadReference thread,
                          Log out,
                          ContextManager ctxtMgr)
Display the stack frames of the given thread, possibly with program counter information included.
Parameters:
thread - ThreadReference whose stack is to be printed.
out - Output to print stack to.
ctxtMgr - Context manager.