APIdia Launch Partner
Top Fields Constructors Methods
com.sun.tools.example.debug.tty

public Class TTY

extends Object
implements EventNotifier
Class Inheritance
All Implemented Interfaces
com.sun.tools.example.debug.tty.EventNotifier
Imports
com.sun.jdi.*, com.sun.jdi.event.*, com.sun.jdi.request.*, com.sun.jdi.connect.*, java.nio.charset.Charset, java.util.*, java.util.concurrent.CopyOnWriteArrayList, java.io.*

Field Summary

Modifier and TypeField and Description
private static final String[][]
pack-priv EventHandler
protected static final Set<String>
LIST_RESET

Commands that reset the default source line to be displayed by list.

private List<String>
monitorCommands

List of Strings to execute at each stop.

private int
protected Integer
nextListTarget

The number of the next source line to target for list, if any.

private static final String
progname

The name of this tool.

protected boolean
repeat

Whether to repeat when the user enters an empty command.

protected static final Set<String>
REPEATABLE

Commands that are repeatable on empty input.

private volatile boolean
private static boolean

Constructor Summary

AccessConstructor and Description
public
TTY()

Method Summary

Modifier and TypeMethod and Description
private static String
addArgument(String string, String argument)

private static String
public void
public void
public void
protected void
public void
pack-priv String
executeCommand(StringTokenizer t)

Returns: the name (first token) of the command processed

public void
private static boolean
pack-priv void
help()

private int
private boolean
private boolean
isReadOnlyCmd(int ii)

public boolean
public static void
main(String[] argv)

public void
public boolean
pack-priv void
private void
private void
private void
private void
private void
pack-priv void
pack-priv boolean
readCommandFile(File f)

Read and execute a command file.

pack-priv String
readStartupCommandFile(String dir, String fname, String canonPath)

Try to read commands from dir/fname, unless the canonical path passed in is the same as that for dir/fname.

public void
public void
setShuttingDown(boolean s)

public void
private static boolean
public void
public void
pack-priv void
private static void
pack-priv static void
usageError(String messageKey)

pack-priv static void
usageError(String messageKey, String argument)

public void
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commandListback to summary
private static final String[][] commandList
handlerback to summary
pack-priv EventHandler handler
LIST_RESETback to summary
protected static final Set<String> LIST_RESET

Commands that reset the default source line to be displayed by list.

monitorCommandsback to summary
private List<String> monitorCommands

List of Strings to execute at each stop.

monitorCountback to summary
private int monitorCount
nextListTargetback to summary
protected Integer nextListTarget

The number of the next source line to target for list, if any.

prognameback to summary
private static final String progname

The name of this tool.

repeatback to summary
protected boolean repeat

Whether to repeat when the user enters an empty command.

REPEATABLEback to summary
protected static final Set<String> REPEATABLE

Commands that are repeatable on empty input.

shuttingDownback to summary
private volatile boolean shuttingDown
trackVthreadsback to summary
private static boolean trackVthreads

Constructor Detail

TTYback to summary
public TTY() throws Exception

Method Detail

addArgumentback to summary
private static String addArgument(String string, String argument)
addressToSocketArgsback to summary
private static String addressToSocketArgs(String address)
breakpointEventback to summary
public void breakpointEvent(BreakpointEvent be)

Implements com.sun.tools.example.debug.tty.EventNotifier.breakpointEvent.

Annotations
@Override
classPrepareEventback to summary
public void classPrepareEvent(ClassPrepareEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.classPrepareEvent.

Annotations
@Override
classUnloadEventback to summary
public void classUnloadEvent(ClassUnloadEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.classUnloadEvent.

Annotations
@Override
doRepeatback to summary
protected void doRepeat(StringTokenizer t)
exceptionEventback to summary
public void exceptionEvent(ExceptionEvent ee)

Implements com.sun.tools.example.debug.tty.EventNotifier.exceptionEvent.

Annotations
@Override
executeCommandback to summary
pack-priv String executeCommand(StringTokenizer t)
Returns:String

the name (first token) of the command processed

fieldWatchEventback to summary
public void fieldWatchEvent(WatchpointEvent fwe)

Implements com.sun.tools.example.debug.tty.EventNotifier.fieldWatchEvent.

Annotations
@Override
hasWhitespaceback to summary
private static boolean hasWhitespace(String string)
helpback to summary
pack-priv void help()
isCommandback to summary
private int isCommand(String key)
isDisconnectCmdback to summary
private boolean isDisconnectCmd(int ii)
isReadOnlyCmdback to summary
private boolean isReadOnlyCmd(int ii)
isShuttingDownback to summary
public boolean isShuttingDown()
mainback to summary
public static void main(String[] argv) throws MissingResourceException
methodEntryEventback to summary
public void methodEntryEvent(MethodEntryEvent me)

Implements com.sun.tools.example.debug.tty.EventNotifier.methodEntryEvent.

Annotations
@Override
methodExitEventback to summary
public boolean methodExitEvent(MethodExitEvent me)

Implements com.sun.tools.example.debug.tty.EventNotifier.methodExitEvent.

Annotations
@Override
monitorCommandback to summary
pack-priv void monitorCommand(StringTokenizer t)
printBaseLocationback to summary
private void printBaseLocation(String threadName, Location loc)
printBreakpointLocationback to summary
private void printBreakpointLocation(BreakpointEvent be)
printCurrentLocationback to summary
private void printCurrentLocation()
printLocationOfEventback to summary
private void printLocationOfEvent(LocatableEvent theEvent)
printLocationWithSourceLineback to summary
private void printLocationWithSourceLine(String threadName, Location loc)
readCommandback to summary
pack-priv void readCommand(StringTokenizer t)
readCommandFileback to summary
pack-priv boolean readCommandFile(File f)

Read and execute a command file. Return true if the file was read else false;

readStartupCommandFileback to summary
pack-priv String readStartupCommandFile(String dir, String fname, String canonPath)

Try to read commands from dir/fname, unless the canonical path passed in is the same as that for dir/fname. Return null if that file doesn't exist, else return the canonical path of that file.

receivedEventback to summary
public void receivedEvent(Event event)

Implements com.sun.tools.example.debug.tty.EventNotifier.receivedEvent.

Annotations
@Override
setShuttingDownback to summary
public void setShuttingDown(boolean s)
stepEventback to summary
public void stepEvent(StepEvent se)

Implements com.sun.tools.example.debug.tty.EventNotifier.stepEvent.

Annotations
@Override
supportsSharedMemoryback to summary
private static boolean supportsSharedMemory()
threadDeathEventback to summary
public void threadDeathEvent(ThreadDeathEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.threadDeathEvent.

Annotations
@Override
threadStartEventback to summary
public void threadStartEvent(ThreadStartEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.threadStartEvent.

Annotations
@Override
unmonitorCommandback to summary
pack-priv void unmonitorCommand(StringTokenizer t)
usageback to summary
private static void usage()
usageErrorback to summary
pack-priv static void usageError(String messageKey)
usageErrorback to summary
pack-priv static void usageError(String messageKey, String argument)
vmDeathEventback to summary
public void vmDeathEvent(VMDeathEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.vmDeathEvent.

Annotations
@Override
vmDisconnectEventback to summary
public void vmDisconnectEvent(VMDisconnectEvent e)

Implements com.sun.tools.example.debug.tty.EventNotifier.vmDisconnectEvent.

Annotations
@Override
vmInterruptedback to summary
public void vmInterrupted()

Implements com.sun.tools.example.debug.tty.EventNotifier.vmInterrupted.

Annotations
@Override
vmStartEventback to summary
public void vmStartEvent(VMStartEvent se)

Implements com.sun.tools.example.debug.tty.EventNotifier.vmStartEvent.

Annotations
@Override