Java 类com.sun.jdi.request.ModificationWatchpointRequest 实例源码

项目:MaxSim    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:openjdk-jdk10    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:openjdk-jdk10    文件:EventRequestManagerImpl.java   
public ModificationWatchpointRequest
                    createModificationWatchpointRequest(Field field) {
    validateMirror(field);
    if (!vm.canWatchFieldModification()) {
        throw new UnsupportedOperationException(
      "target VM does not support modification watchpoints");
    }
    return new ModificationWatchpointRequestImpl(field);
}
项目:openjdk9    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:lookaside_java-1.8.0-openjdk    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:form-follows-function    文件:F3EventRequest.java   
public static List<ModificationWatchpointRequest> wrapModificationWatchpointRequests(
        F3VirtualMachine f3vm, List<ModificationWatchpointRequest> reqs) {
    if (reqs == null) {
        return null;
    }
    List<ModificationWatchpointRequest> result = new ArrayList<ModificationWatchpointRequest>();
    for (ModificationWatchpointRequest req : reqs) {
        result.add(wrap(f3vm, req));
    }
    return result;
}
项目:infobip-open-jdk-8    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:OLD-OpenJDK8    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:jive    文件:EventHandlerFactory.java   
protected void createFieldRequests(final JDIDebugTarget target, final ReferenceType refType)
{
  final EventRequestManager manager = target.getEventRequestManager();
  if (manager != null)
  {
    try
    {
      // monitor all non-synthetic fields of the prepared classes for reads/writes
      for (final Object o : refType.fields())
      {
        final Field f = (Field) o;
        // Ignore compiler generated fields
        if (!f.isSynthetic() && f.name().indexOf("$") == -1)
        {
          // monitor field reads
          final AccessWatchpointRequest readRequest = manager.createAccessWatchpointRequest(f);
          readRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
          readRequest.enable();
          fieldRequests.add(readRequest);
          target.addJDIEventListener(fieldReadHandler, readRequest);
          // monitor field writes
          final ModificationWatchpointRequest writeRequest = manager
              .createModificationWatchpointRequest(f);
          writeRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
          writeRequest.enable();
          fieldRequests.add(writeRequest);
          target.addJDIEventListener(fieldWriteHandler, writeRequest);
        }
      }
    }
    catch (final RuntimeException e)
    {
      JiveDebugPlugin.log(e);
    }
  }
}
项目:openjdk-icedtea7    文件:FieldMonitor.java   
private static void addFieldWatch(VirtualMachine vm,
    ReferenceType refType) {
  EventRequestManager erm = vm.eventRequestManager();
  Field field = refType.fieldByName(FIELD_NAME);
  ModificationWatchpointRequest modificationWatchpointRequest = erm
      .createModificationWatchpointRequest(field);
  modificationWatchpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
  modificationWatchpointRequest.setEnabled(true);
}
项目:openjdk-jdk10    文件:EventRequestManagerImpl.java   
public List<ModificationWatchpointRequest> modificationWatchpointRequests() {
    return (List<ModificationWatchpointRequest>)unmodifiableRequestList(JDWP.EventKind.FIELD_MODIFICATION);
}
项目:form-follows-function    文件:F3ModificationWatchpointRequest.java   
public F3ModificationWatchpointRequest(F3VirtualMachine f3vm, ModificationWatchpointRequest underlying) {
    super(f3vm, underlying);
}
项目:form-follows-function    文件:F3ModificationWatchpointRequest.java   
@Override
protected ModificationWatchpointRequest underlying() {
    return (ModificationWatchpointRequest) super.underlying();
}
项目:form-follows-function    文件:F3EventRequestManager.java   
public List<ModificationWatchpointRequest> modificationWatchpointRequests() {
    return F3EventRequest.wrapModificationWatchpointRequests(virtualMachine(),
            underlying().modificationWatchpointRequests());
}
项目:form-follows-function    文件:F3EventRequest.java   
public static F3EventRequest wrap(F3VirtualMachine f3vm, EventRequest req) {
    if (req == null) {
        return null;
    }

    if (req instanceof AccessWatchpointRequest) {
        return new F3AccessWatchpointRequest(f3vm, (AccessWatchpointRequest)req);
    } else if (req instanceof BreakpointRequest) {
        return new F3BreakpointRequest(f3vm, (BreakpointRequest)req);
    } else if (req instanceof ClassPrepareRequest) {
        return new F3ClassPrepareRequest(f3vm, (ClassPrepareRequest)req);
    } else if (req instanceof ClassUnloadRequest) {
        return new F3ClassUnloadRequest(f3vm, (ClassUnloadRequest)req);
    } else if (req instanceof ExceptionRequest) {
        return new F3ExceptionRequest(f3vm, (ExceptionRequest)req);
    } else if (req instanceof MethodEntryRequest) {
        return new F3MethodEntryRequest(f3vm, (MethodEntryRequest)req);
    } else if (req instanceof MethodExitRequest) {
        return new F3MethodExitRequest(f3vm, (MethodExitRequest)req);
    } else if (req instanceof ModificationWatchpointRequest) {
        return new F3ModificationWatchpointRequest(f3vm, (ModificationWatchpointRequest)req);
    } else if (req instanceof MonitorContendedEnterRequest) {
        return new F3MonitorContendedEnterRequest(f3vm, (MonitorContendedEnterRequest)req);
    } else if (req instanceof MonitorContendedEnteredRequest) {
        return new F3MonitorContendedEnteredRequest(f3vm, (MonitorContendedEnteredRequest)req);
    } else if (req instanceof MonitorWaitRequest) {
        return new F3MonitorWaitRequest(f3vm, (MonitorWaitRequest)req);
    } else if (req instanceof MonitorWaitedRequest) {
        return new F3MonitorWaitedRequest(f3vm, (MonitorWaitedRequest)req);
    } else if (req instanceof StepRequest) {
        return new F3StepRequest(f3vm, (StepRequest)req);
    } else if (req instanceof ThreadDeathRequest) {
        return new F3ThreadDeathRequest(f3vm, (ThreadDeathRequest)req);
    } else if (req instanceof ThreadStartRequest) {
        return new F3ThreadStartRequest(f3vm, (ThreadStartRequest)req);
    } else if (req instanceof VMDeathRequest) {
        return new F3VMDeathRequest(f3vm, (VMDeathRequest)req);
    } else if (req instanceof WatchpointRequest) {
        return new F3WatchpointRequest(f3vm, (WatchpointRequest)req);
    } else {
        return new F3EventRequest(f3vm, req);
    }
}
项目:form-follows-function    文件:F3EventRequest.java   
public static F3ModificationWatchpointRequest wrap(
        F3VirtualMachine f3vm, ModificationWatchpointRequest req) {
    return (req == null)? null : new F3ModificationWatchpointRequest(f3vm, req);
}