|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.command.JSwatCommand
Defines the abstract class for command classes within JSwat.
Field Summary | |
protected static Category |
logCategory
Reporting Category for logging debugging events. |
protected static java.util.List |
primitiveTypeNames
List of primitive type names. |
protected static JSwat |
swat
Instance of JSwat. |
Constructor Summary | |
JSwatCommand()
|
Method Summary | |
protected static boolean |
argumentsMatch(java.util.List argNames,
java.util.List arguments)
Tests if the two lists of arguments match in types. |
static com.sun.jdi.ObjectReference |
createObject(com.sun.jdi.ReferenceType refType,
java.util.List arguments,
com.sun.jdi.ThreadReference thread)
Creates an object of the given class in the debuggee VM. |
java.lang.String |
description()
Return a short, one-line description of this command. |
static java.util.List |
findClassesByPattern(Session session,
java.lang.String pattern)
Return a list of classes and interfaces whose names match the given pattern. |
java.lang.String |
getCommandName()
Retrieves the name of this command (similar to the class name). |
static com.sun.jdi.ThreadReference |
getThreadByID(Session session,
java.lang.String idToken)
Finds a thread in the list of all threads whose unique ID number matches that given. |
void |
help(Log out)
Display helpful information about this command, including the possible arguments and their interpretation. |
protected void |
help(Log out,
java.lang.StringBuffer buf)
Display helpful information about this command, including the possible arguments and their interpretation. |
void |
missingArgs(Log out)
Display helpful information about this command because the user failed to provide all of the necessary arguments. |
abstract void |
perform(Session session,
com.bluemarsh.util.StringTokenizer args,
Log out)
Perform the command using the given arguments. |
void |
receiveInput(Session session,
Log out,
CommandManager cmdman,
java.lang.String input)
Called by the CommandManager when new input has been received from the user. |
protected static com.sun.jdi.Method |
resolveOverload(java.util.List overloads,
java.util.List arguments)
Finds a method that matches the given arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.util.List primitiveTypeNames
protected static JSwat swat
protected static Category logCategory
Constructor Detail |
public JSwatCommand()
Method Detail |
protected static boolean argumentsMatch(java.util.List argNames, java.util.List arguments)
argNames
- Names of arguments.arguments
- List of method arguments.public static com.sun.jdi.ObjectReference createObject(com.sun.jdi.ReferenceType refType, java.util.List arguments, com.sun.jdi.ThreadReference thread) throws com.sun.jdi.ClassNotLoadedException, com.sun.jdi.IncompatibleThreadStateException, com.sun.jdi.InvalidTypeException, com.sun.jdi.InvocationException
refType
- Class of object to create.arguments
- List of argument values to pass to constructor.thread
- Thread in which to create new object. Must be
suspended before calling this method.com.sun.jdi.ClassNotLoadedException
- Thrown if any argument type has not yet been loaded.com.sun.jdi.IncompatibleThreadStateException
- Thrown if the thread is not suspended.com.sun.jdi.InvalidTypeException
- Thrown if argument types are not assignment-compatible
with the arguments in the constructor.com.sun.jdi.InvocationException
- Thrown if there's an error calling the class's constructor.public java.lang.String description()
public java.lang.String getCommandName()
public static java.util.List findClassesByPattern(Session session, java.lang.String pattern) throws NotActiveException
session
- current Session.pattern
- Classname pattern (possibly prefixed with "*.").NotActiveException
- Thrown if the session is not active.public static com.sun.jdi.ThreadReference getThreadByID(Session session, java.lang.String idToken) throws NoSuchThreadException, NotActiveException
session
- current Session.idToken
- thread ID token.NoSuchThreadException
- Thrown if the thread ID does not match a known thread.NotActiveException
- Thrown if the current session is not active.java.lang.NumberFormatException
- Thrown if the idToken
is not a valid number.public void help(Log out)
out
- output to write help message to.protected void help(Log out, java.lang.StringBuffer buf)
out
- output to write help message to.buf
- string buffer to use for printing.public void missingArgs(Log out)
out
- output to write help message to.public abstract void perform(Session session, com.bluemarsh.util.StringTokenizer args, Log out)
out
object.session
- JSwat session on which to operate.args
- Tokenized string of command arguments.out
- Output to write messages to.public void receiveInput(Session session, Log out, CommandManager cmdman, java.lang.String input)
CommandManager.grabInput()
session
- JSwat session on which to operate.out
- Output to write messages to.cmdman
- CommandManager that's calling us.input
- Input from user.protected static com.sun.jdi.Method resolveOverload(java.util.List overloads, java.util.List arguments)
overloads
- List of overloaded methods.arguments
- List of arguments for method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |