|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jde.debugger.spec.EventRequestSpec
EventRequestSpec.java
A request specification. This is used for watchpoints, exception-catches, and breakpoints, and provides a mechanism for implementing deferral.
The intuition is that the user should be allowed to specify things like breakpoints, even though the corresponding classes haven't been loaded yet.
When the user does a, for example, "break on_line test.Test 42", jdebug tries to find if test.Test has been loaded. If it has, it tries to set the breakpoint, and sends an error on failure.
If, however, no class matching test.Test exists, jdebug places this "spec" in a list, and each time a class is prepared, matches the class with the spec. If the spec matches, it tries to set the breakpoint / watchpoint / exception-catch. If it works, fine, else it sends the error over to jde.
This also allows for neat things like setting breakpoints on source file + line number combinations, since each reference type (given it was compiled with debug info) also contains the source file name in it.
Information that would normally be stuck right into the actual requests,
for example a thread filter, is stored in the spec until the time it can
resolve the request. At that time, it is set in #setRequest
.
XXX
Note that as of now, when the doc is being written, there is no way of ascertaining if the user mistyped the referencetype name/pattern, since jdebug will just wait ad infinitum for that class to be prepared.
Created: Thu Jul 15 12:17:34 1999
Field Summary | |
static java.lang.Object |
expressionKey
While setting some specs, the user is allowed to specify a boolean expression that must evaluate to true if the event is to be passed on to the user. |
static java.lang.Object |
specPropertyKey
Used to cross-reference the EventRequest to its spec. |
static java.lang.Object |
threadKey
For specs that allow for it, the thread object is either null, a Long, or a
String. |
Constructor Summary | |
EventRequestSpec(ReferenceTypeSpec refSpec)
|
Method Summary | |
void |
attemptResolve(com.sun.jdi.ReferenceType refType,
java.lang.Integer procID)
This function is called after each new class is loaded. |
com.sun.jdi.request.EventRequest |
getEventRequest()
|
java.lang.Long |
getID()
get the id corresponding to this spec |
boolean |
isResolved()
|
void |
setClassExFilters(java.util.List filters)
|
void |
setClassFilters(java.util.List filters)
|
void |
setExpression(java.lang.String expr)
|
void |
setIsResolved(java.lang.Integer procID)
set resolved status and notify Emacs. |
void |
setSuspendPolicy(int policy)
|
void |
setThread(java.lang.Object thread)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Object expressionKey
public static final java.lang.Object threadKey
thread
object is either null, a Long, or a
String. Depending on the type, it is matched at the time the
breakpoint is hit. If it matches the thread, the breakpoint is
deemed non-hit.public static final java.lang.Object specPropertyKey
Constructor Detail |
public EventRequestSpec(ReferenceTypeSpec refSpec)
Method Detail |
public void setExpression(java.lang.String expr)
public void setThread(java.lang.Object thread)
public void setSuspendPolicy(int policy)
public void setClassFilters(java.util.List filters)
public void setClassExFilters(java.util.List filters)
public java.lang.Long getID()
public com.sun.jdi.request.EventRequest getEventRequest()
public void attemptResolve(com.sun.jdi.ReferenceType refType, java.lang.Integer procID) throws JDEException
#attemptImmediateResolve
public boolean isResolved()
public void setIsResolved(java.lang.Integer procID)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |