Package com.sun.jdi.request

Examples of com.sun.jdi.request.EventRequest


   *            the event whose request should have its hit count expired or
   *            <code>null</code> to only update the breakpoint marker.
   */
  protected void expireHitCount(Event event) {
    Integer requestCount = null;
    EventRequest request = null;
    if (event != null) {
      request = event.request();
      requestCount = (Integer) request.getProperty(HIT_COUNT);
    }
    if (requestCount != null) {
      if (request != null) {
        request.putProperty(EXPIRED, Boolean.TRUE);
      }
      try {
        setAttributes(fgExpiredEnabledAttributes, new Object[] {
            Boolean.TRUE, Boolean.FALSE });
        // make a note that we auto-disabled this breakpoint.
View Full Code Here


    ArrayList<EventRequest> requests = (ArrayList<EventRequest>) getRequests(target).clone();
    // Iterate over a copy of the requests since this list of requests
    // can be changed in other threads which would cause an
    // ConcurrentModificationException
    Iterator<EventRequest> iter = requests.iterator();
    EventRequest req;
    while (iter.hasNext()) {
      req = iter.next();
      try {
        if (target.isAvailable() && !isExpired(req)) { // cannot delete
                                // an expired
View Full Code Here

        boolean failure = false;
        synchronized(eventRequestSpecs) {
            for (EventRequestSpec spec : eventRequestSpecs) {
                if (!spec.isResolved()) {
                    try {
                        EventRequest eventRequest = spec.resolve(event);
                        if (eventRequest != null) {
                            MessageOutput.println("Set deferred", spec.toString());
                        }
                    } catch (Exception e) {
                        MessageOutput.println("Unable to set deferred",
View Full Code Here

    }

    void resolveAll() {
        for (EventRequestSpec spec : eventRequestSpecs) {
            try {
                EventRequest eventRequest = spec.resolveEagerly();
                if (eventRequest != null) {
                    MessageOutput.println("Set deferred", spec.toString());
                }
            } catch (Exception e) {
            }
View Full Code Here

    }

    boolean addEagerlyResolve(EventRequestSpec spec) {
        try {
            eventRequestSpecs.add(spec);
            EventRequest eventRequest = spec.resolveEagerly();
            if (eventRequest != null) {
                MessageOutput.println("Set", spec.toString());
            }
            return true;
        } catch (Exception exc) {
View Full Code Here

    @Override
    EventRequest resolveEventRequest(ReferenceType refType)
                                      throws NoSuchFieldException {
        Field field = refType.fieldByName(fieldId);
        EventRequestManager em = refType.virtualMachine().eventRequestManager();
        EventRequest wp = em.createModificationWatchpointRequest(field);
        wp.setSuspendPolicy(suspendPolicy);
        wp.enable();
        return wp;
    }
View Full Code Here

TOP

Related Classes of com.sun.jdi.request.EventRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.