package bluej.debugger;
import threadchecker.OnThread;
import threadchecker.Tag;
| This class represents the result of a debugger invocation (execution of user code).
| The three result types are:
| NORMAL_EXIT - execution completed normally, result object may be available
| EXCEPTION - execution terminated via an exception, ExceptionDescription available
| TERMINATED - remote VM terminated before execution completed (possibly result of
| System.exit() call).
|
| @author Davin McCall
|
@OnThread(Tag.Any)
public class DebuggerResult
{
private final int exitStatus;
private DebuggerObject resultObject;
private ExceptionDescription exception;
| Construct a DebuggerResult for a normal completion.
| @param resultObject The result of the execution.
|
public DebuggerResult(DebuggerObject resultObject)
{
exitStatus = Debugger.NORMAL_EXIT;
this.resultObject = resultObject;
}
| Construct a DebuggerResult for an execution which resulted in an exception.
|
public DebuggerResult(ExceptionDescription exception)
{
exitStatus = Debugger.EXCEPTION;
this.exception = exception;
}
public DebuggerResult(int status)
{
exitStatus = status;
}
| Get the status of the invocation. Returns one of:
| <ul>
| <li>Debugger.NORMAL_EXIT - the invocation succeeded
| <li>Debugger.EXCEPTION - an exception occurred in the invoked code
| <li>Debugger.TERMINATED - the debug VM exited (possibly due to a
| System.exit() call)
| </ul>
| @return
|
public int getExitStatus()
{
return exitStatus;
}
| Returns the result of the invocation as a DebuggerObject.
| This is only valid for a NORMAL_EXIT; any other invocation
| result will cause this method to return null.
|
public DebuggerObject getResultObject()
{
return resultObject;
}
public ExceptionDescription getException()
{
return exception;
}
}
top,
use,
map,
class DebuggerResult
. DebuggerResult
. DebuggerResult
. DebuggerResult
. getExitStatus
. getResultObject
. getException
65 neLoCode
+ 21 LoComm