当前位置: 首页>>代码示例>>Java>>正文


Java ClassPrepareRequest类代码示例

本文整理汇总了Java中com.sun.jdi.request.ClassPrepareRequest的典型用法代码示例。如果您正苦于以下问题:Java ClassPrepareRequest类的具体用法?Java ClassPrepareRequest怎么用?Java ClassPrepareRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ClassPrepareRequest类属于com.sun.jdi.request包,在下文中一共展示了ClassPrepareRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPrepareRequests

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@NotNull
@Override
public List<ClassPrepareRequest> createPrepareRequests(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position) {
  return iterate(new Processor<List<ClassPrepareRequest>>() {
    @Override
    public List<ClassPrepareRequest> process(PositionManager positionManager) throws NoDataException {
      if (positionManager instanceof MultiRequestPositionManager) {
        return ((MultiRequestPositionManager)positionManager).createPrepareRequests(requestor, position);
      }
      else {
        ClassPrepareRequest prepareRequest = positionManager.createPrepareRequest(requestor, position);
        if (prepareRequest == null) {
          return Collections.emptyList();
        }
        return Collections.singletonList(prepareRequest);
      }
    }
  }, Collections.<ClassPrepareRequest>emptyList());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:CompoundPositionManager.java

示例2: deferBreakpoint

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
private void deferBreakpoint(String className, Breakpoint breakpoint) throws DebuggerException {
  List<Breakpoint> newList = new ArrayList<>();
  List<Breakpoint> list = deferredBreakpoints.putIfAbsent(className, newList);
  if (list == null) {
    list = newList;
  }
  list.add(breakpoint);

  // start listening for the load of the type
  if (!classPrepareRequests.containsKey(className)) {
    ClassPrepareRequest request = getEventManager().createClassPrepareRequest();
    // set class filter in order to reduce the amount of event traffic sent from the target VM to
    // the debugger VM
    request.addClassFilter(className);
    request.enable();
    classPrepareRequests.put(className, request);
  }

  LOG.debug("Deferred breakpoint: {}", breakpoint.getLocation().toString());
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:JavaDebugger.java

示例3: processClassPrepareEvent

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
private boolean processClassPrepareEvent(com.sun.jdi.event.ClassPrepareEvent event)
    throws DebuggerException {
  setCurrentThread(event.thread());
  final String className = event.referenceType().name();

  // add deferred breakpoints
  List<Breakpoint> breakpointsToAdd = deferredBreakpoints.get(className);
  if (breakpointsToAdd != null) {

    for (Breakpoint b : breakpointsToAdd) {
      addBreakpoint(b);
    }
    deferredBreakpoints.remove(className);

    // All deferred breakpoints for className have been already added,
    // so no need to listen for an appropriate ClassPrepareRequests any more.
    ClassPrepareRequest request = classPrepareRequests.remove(className);
    if (request != null) {
      getEventManager().deleteEventRequest(request);
    }
  }
  return true;
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:JavaDebugger.java

示例4: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
public ClassPrepareRequest createPrepareRequest(final ClassPrepareRequestor requestor, final SourcePosition position)
  throws NoDataException {
  String qName = getOuterClassName(position);
  if (qName != null) {
    return myDebugProcess.getRequestsManager().createClassPrepareRequest(requestor, qName);
  }

  qName = findEnclosingName(position);

  if (qName == null) throw new NoDataException();
  ClassPrepareRequestor waitRequestor = new ClassPrepareRequestor() {
    public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
      final CompoundPositionManager positionManager = ((DebugProcessImpl)debuggerProcess).getPositionManager();
      if (positionManager.locationsOfLine(referenceType, position).size() > 0) {
        requestor.processClassPrepare(debuggerProcess, referenceType);
      }
    }
  };
  return myDebugProcess.getRequestsManager().createClassPrepareRequest(waitRequestor, qName + "$*");
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:GroovyPositionManager.java

示例5: createRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
protected void createRequest()
{
  final EventRequestManager manager = owner.getEventRequestManager();
  if (manager != null)
  {
    try
    {
      final ClassPrepareRequest request = manager.createClassPrepareRequest();
      owner.jdiManager().modelFilter().filter(request);
      request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
      request.enable();
      owner.addJDIEventListener(this, request);
    }
    catch (final RuntimeException e)
    {
      JiveDebugPlugin.log(e);
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:20,代码来源:EventHandlerFactory.java

示例6: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@Override
public ClassPrepareRequest createPrepareRequest() {
    ClassPrepareRequest request =
        Env.vm().eventRequestManager().createClassPrepareRequest();
    request.addClassFilter(classId);
    request.addCountFilter(1);
    return request;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:PatternReferenceTypeSpec.java

示例7: addClassWatch

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
private static void addClassWatch(VirtualMachine vm) {
  EventRequestManager erm = vm.eventRequestManager();
  ClassPrepareRequest classPrepareRequest = erm
      .createClassPrepareRequest();
  classPrepareRequest.addClassFilter(CLASS_NAME);
  classPrepareRequest.setEnabled(true);
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:8,代码来源:FieldMonitor.java

示例8: addClassWatch

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
private static void addClassWatch(VirtualMachine vm) {
    EventRequestManager erm = vm.eventRequestManager();
    ClassPrepareRequest classPrepareRequest = erm
            .createClassPrepareRequest();
    classPrepareRequest.addClassFilter(CLASS_NAME);
    classPrepareRequest.setEnabled(true);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:GetObjectLockCount.java

示例9: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position)
  throws NoDataException {
  checkSourcePositionFileType(position);

  return myDebugProcess.getRequestsManager().createClassPrepareRequest(new ClassPrepareRequestor() {
    @Override
    public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
      onClassPrepare(debuggerProcess, referenceType, position, requestor);
    }
  }, GENERATED_CLASS_PATTERN);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JSR45PositionManager.java

示例10: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position) {
  return iterate(new Processor<ClassPrepareRequest>() {
    @Override
    public ClassPrepareRequest process(PositionManager positionManager) throws NoDataException {
      return positionManager.createPrepareRequest(requestor, position);
    }
  }, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CompoundPositionManager.java

示例11: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position)
  throws NoDataException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("createPrepareRequest: " + position);
  }
  checkGroovyFile(position);

  String qName = getOuterClassName(position);
  if (qName != null) {
    return myDebugProcess.getRequestsManager().createClassPrepareRequest(requestor, qName);
  }

  qName = findEnclosingName(position);

  if (qName == null) throw NoDataException.INSTANCE;
  ClassPrepareRequestor waitRequestor = new ClassPrepareRequestor() {
    @Override
    public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
      final CompoundPositionManager positionManager = ((DebugProcessImpl)debuggerProcess).getPositionManager();
      if (!positionManager.locationsOfLine(referenceType, position).isEmpty()) {
        requestor.processClassPrepare(debuggerProcess, referenceType);
      }
    }
  };
  return myDebugProcess.getRequestsManager().createClassPrepareRequest(waitRequestor, qName + "$*");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:GroovyPositionManager.java

示例12: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull ClassPrepareRequestor requestor, @NotNull SourcePosition position) throws NoDataException {
  String className = getOuterClassName(position);
  if (className == null) {
    throw NoDataException.INSTANCE;
  }

  return myDebugProcess.getRequestsManager().createClassPrepareRequest(requestor, className + "*");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SpringLoadedPositionManager.java

示例13: wrapClassPrepareRequests

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
public static List<ClassPrepareRequest> wrapClassPrepareRequests(
        F3VirtualMachine f3vm,  List<ClassPrepareRequest> reqs) {
    if (reqs == null) {
        return null;
    }
    List<ClassPrepareRequest> result = new ArrayList<ClassPrepareRequest>();
    for (ClassPrepareRequest req : reqs) {
        result.add(wrap(f3vm, req));
    }
    return result;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:12,代码来源:F3EventRequest.java

示例14: createPrepareRequest

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
public ClassPrepareRequest createPrepareRequest() {
    ClassPrepareRequest request =
        env.vm().eventRequestManager().createClassPrepareRequest();
    request.addClassFilter(classId);
    request.addCountFilter(1);
    return request;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:8,代码来源:PatternReferenceTypeSpec.java

示例15: resumeToPrepareOf

import com.sun.jdi.request.ClassPrepareRequest; //导入依赖的package包/类
public ClassPrepareEvent resumeToPrepareOf(String className) {
    final ClassPrepareRequest request =
            eventRequestManager().createClassPrepareRequest();
    request.addClassFilter(className);
    request.addCountFilter(1);
    request.enable();
    return (ClassPrepareEvent)resumeToEvent(request);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:9,代码来源:Debugger.java


注:本文中的com.sun.jdi.request.ClassPrepareRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。