• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EventIterator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: run

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
/**
 * Run the event handling thread.
 * 
 * As long as the thread remains connected to the VM, events are removed
 * from the queue and dispatched.
 */
@Override
public void run() {
    EventQueue queue = vm.eventQueue();

    while (connected) {
        try {
            EventSet eventSet = queue.remove();

            EventIterator eventIterator = eventSet.eventIterator();
            while (eventIterator.hasNext()) {
                handleEvent(eventIterator.nextEvent());
            }
            eventSet.resume();
        } catch (InterruptedException ie) {
            vm.dispose();
            break;
        } catch (VMDisconnectedException vmde) {
            handleDisconnectedException();
            break;
        }
    }
}
 
开发者ID:adrianherrera,项目名称:jdivisitor,代码行数:29,代码来源:EventThread.java


示例2: start

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
private void start() throws Exception {
    eventQueue = debuggee.eventQueue();
    while (true) {
        if (isExit == true) {
            break;
        }
        eventSet = eventQueue.remove();
        EventIterator eventIterator = eventSet.eventIterator();
        while (eventIterator.hasNext()) {
            Event event = (Event) eventIterator.next();
            execute(event);
        }
        if (!isExit) {
            eventSet.resume();
        }
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:Main.java


示例3: handleDisconnectedException

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
/***
* A VMDisconnectedException has happened while dealing with
* another event. We need to flush the event queue, dealing only
* with exit events (VMDeath, VMDisconnect) so that we terminate
* correctly.
*/
   synchronized void handleDisconnectedException() {
       EventQueue queue = vm.eventQueue();
       while (connected) {
           try {
               EventSet eventSet = queue.remove();
               EventIterator iter = eventSet.eventIterator();
               while (iter.hasNext()) {
                   Event event = iter.nextEvent();
                   if (event instanceof VMDeathEvent) {
                       vmDeathManager.vmDeathEvent((VMDeathEvent)event,enableProfiling);
                   } else if (event instanceof VMDisconnectEvent) {
                       connected=disconnect.vmDisconnectEvent((VMDisconnectEvent)event);
                   }
               }
               eventSet.resume(); // Resume the VM
               
           } catch (InterruptedException exc) {
               exc.printStackTrace();
           }
       }
   }
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:28,代码来源:EventThread.java


示例4: loop

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
private void loop(BreakpointRequest br, Field contextField) throws Exception {
  int lineNumber = br.location().lineNumber();

  br.setSuspendPolicy(BreakpointRequest.SUSPEND_EVENT_THREAD);
  br.enable();
  EventQueue evtQueue = vm.eventQueue();
  boolean run = true;
  while (run) {
    EventSet evtSet = evtQueue.remove();
    EventIterator evtIter = evtSet.eventIterator();
    while (evtIter.hasNext()) {
      try {
        Event evt = evtIter.next();
        EventRequest evtReq = evt.request();
        if (evtReq instanceof BreakpointRequest
            && ((BreakpointRequest) evtReq).location().lineNumber() == lineNumber) {
          new BreakpointProcessor(missingPerms)
              .processBreakpoint(contextField, (BreakpointEvent) evt);

          // TODO: 12/20/17 Remove when full loop processing is restored
          // run = false;
          System.out.println(missingPerms);
          missingPerms.clear();
        }
      } finally {
        evtSet.resume();
      }
    }
  }

  //    System.out.println(missingPerms);
  //    printPerms(missingPerms);
}
 
开发者ID:coyotesqrl,项目名称:acdebugger,代码行数:34,代码来源:PermissionDebugger.java


示例5: handleDisconnectedException

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
/**
 * A {@link VMDisconnectedException} has happened while dealing with another
 * event. We need to flush the event queue, dealing only with exit events (
 * {@link VMDeatEvent} and {@link VMDisconnectEvent}) so that we terminate
 * correctly.
 */
private void handleDisconnectedException() {
    EventQueue queue = vm.eventQueue();

    while (connected) {
        try {
            EventSet eventSet = queue.remove();

            EventIterator eventIterator = eventSet.eventIterator();
            while (eventIterator.hasNext()) {
                Event event = eventIterator.nextEvent();

                if (event instanceof VMDeathEvent) {
                    handleEvent(event);
                } else if (event instanceof VMDisconnectEvent) {
                    handleEvent(event);
                    connected = false;
                }
            }
            eventSet.resume();
        } catch (InterruptedException ie) {
            vm.dispose();
            break;
        } catch (VMDisconnectedException vmde) {
            break;
        }
    }
}
 
开发者ID:adrianherrera,项目名称:jdivisitor,代码行数:34,代码来源:EventThread.java


示例6: run

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
/**
* Run the event handling thread.
* As long as we are connected, get event sets off
* the queue and dispatch the events within them.
*/

   public void run() {
       EventQueue queue = vm.eventQueue();
               
       while (connected && !forceExit) {
           try {
           	
                EventSet eventSet = queue.remove();
                EventIterator it = eventSet.eventIterator();
                while (it.hasNext())
               	 handleEvent(it.nextEvent());
                eventSet.resume();
                
           } catch (InterruptedException exc) {
              exc.printStackTrace();
           } catch (VMDisconnectedException discExc) {
           	discExc.printStackTrace();
               handleDisconnectedException();
               break;
           }
       }
       
       if (forceExit){
       	vm.exit(-1);
       	if (!enableProfiling)
       		writer.close();
       	tracer.finishedTrace();
       }
   }
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:35,代码来源:EventThread.java


示例7: eventIterator

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
public EventIterator eventIterator() {
    return new Itr();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:EventSetImpl.java


示例8: F3EventIterator

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
public F3EventIterator(F3VirtualMachine f3vm, EventIterator underlying) {
    this.f3vm = f3vm;
    this.underlying = underlying;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:5,代码来源:F3EventIterator.java


示例9: underlying

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
protected EventIterator underlying() {
    return underlying;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:4,代码来源:F3EventIterator.java


示例10: wrap

import com.sun.jdi.event.EventIterator; //导入依赖的package包/类
public static F3EventIterator wrap(F3VirtualMachine f3vm, EventIterator evtItr) {
    return (evtItr == null)? null : new F3EventIterator(f3vm, evtItr);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:4,代码来源:F3EventIterator.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CharacterOffsetEndAnnotation类代码示例发布时间:2022-05-22
下一篇:
Java CombinedXYPlot类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap