org.kohsuke.youdebug
Class BundledWatchpointRequest

java.lang.Object
  extended by org.kohsuke.youdebug.BundledEventRequest<E>
      extended by org.kohsuke.youdebug.BundledWatchpointRequest
All Implemented Interfaces:
groovy.lang.GroovyObject

public class BundledWatchpointRequest
extends BundledEventRequest<E>
implements groovy.lang.GroovyObject

Multiple WatchpointRequests bundled to behave as one WatchpointRequest.

Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class org.kohsuke.youdebug.BundledEventRequest
requests
 
Fields inherited from interface com.sun.jdi.request.EventRequest
SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
 
Constructor Summary
BundledWatchpointRequest(com.sun.jdi.request.ClassPrepareRequest req, List requests)
           
 
Method Summary
 void addClassExclusionFilter(String classPattern)
          Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression.
 void addClassFilter(com.sun.jdi.ReferenceType refType)
          Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes.
 void addClassFilter(String classPattern)
          Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression.
 void addInstanceFilter(com.sun.jdi.ObjectReference instance)
          Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.
 void addThreadFilter(com.sun.jdi.ThreadReference thread)
          Restricts the events generated by this request to those in the given thread.
 void delete()
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String name)
           
 Object invokeMethod(String name, Object args)
           
 void setEnabled(boolean val)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(String name, Object value)
           
 
Methods inherited from class org.kohsuke.youdebug.BundledEventRequest
addCountFilter, disable, enable, getProperty, isEnabled, one, putProperty, setSuspendPolicy, suspendPolicy, virtualMachine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.jdi.Mirror
toString
 

Constructor Detail

BundledWatchpointRequest

public BundledWatchpointRequest(com.sun.jdi.request.ClassPrepareRequest req,
                                List requests)
Method Detail

addThreadFilter

public void addThreadFilter(com.sun.jdi.ThreadReference thread)
Restricts the events generated by this request to those in the given thread.

Parameters:
thread - the thread to filter on.
Throws:
com.sun.jdi.request.InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(com.sun.jdi.ReferenceType refType)
Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type.

Parameters:
refType - the reference type to filter on.
Throws:
com.sun.jdi.request.InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

addClassFilter

public void addClassFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name matches a restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".

Parameters:
classPattern - the pattern String to filter for.
Throws:
com.sun.jdi.request.InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

addClassExclusionFilter

public void addClassExclusionFilter(String classPattern)
Restricts the events generated by this request to those whose location is in a class whose name does not match this restricted regular expression. Regular expressions are limited to exact matches and patterns that begin with '*' or end with '*'; for example, "*.Foo" or "java.*".

Parameters:
classPattern - the pattern String to filter against.
Throws:
com.sun.jdi.request.InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.

addInstanceFilter

public void addInstanceFilter(com.sun.jdi.ObjectReference instance)
Restricts the events generated by this request to those in which the currently executing instance ("this") is the object specified.

Not all targets support this operation. Use VirtualMachine.canUseInstanceFilters() to determine if the operation is supported.

Parameters:
instance - the object which must be the current instance in order to pass this filter.
Throws:
UnsupportedOperationException - if the target virtual machine does not support this operation.
com.sun.jdi.request.InvalidRequestStateException - if this request is currently enabled or has been deleted. Filters may be added only to disabled requests.
Since:
1.4

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject

setEnabled

public void setEnabled(boolean val)
Overrides:
setEnabled in class BundledEventRequest<E extends com.sun.jdi.request.EventRequest>

delete

public void delete()
Overrides:
delete in class BundledEventRequest<E extends com.sun.jdi.request.EventRequest>


Copyright © 2013. All rights reserved.