本文整理汇总了Java中com.sun.jdi.event.VMStartEvent类的典型用法代码示例。如果您正苦于以下问题:Java VMStartEvent类的具体用法?Java VMStartEvent怎么用?Java VMStartEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VMStartEvent类属于com.sun.jdi.event包,在下文中一共展示了VMStartEvent类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: wrap
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public static F3Event wrap(F3VirtualMachine f3vm, Event evt) {
if (evt == null) {
return null;
}
if (evt instanceof AccessWatchpointEvent) {
return new F3AccessWatchpointEvent(f3vm, (AccessWatchpointEvent)evt);
} else if (evt instanceof BreakpointEvent) {
return new F3BreakpointEvent(f3vm, (BreakpointEvent)evt);
} else if (evt instanceof ClassPrepareEvent) {
return new F3ClassPrepareEvent(f3vm, (ClassPrepareEvent)evt);
} else if (evt instanceof ClassUnloadEvent) {
return new F3ClassUnloadEvent(f3vm, (ClassUnloadEvent)evt);
} else if (evt instanceof ExceptionEvent) {
return new F3ExceptionEvent(f3vm, (ExceptionEvent)evt);
} else if (evt instanceof MethodEntryEvent) {
return new F3MethodEntryEvent(f3vm, (MethodEntryEvent)evt);
} else if (evt instanceof MethodExitEvent) {
return new F3MethodExitEvent(f3vm, (MethodExitEvent)evt);
} else if (evt instanceof ModificationWatchpointEvent) {
return new F3ModificationWatchpointEvent(f3vm, (ModificationWatchpointEvent)evt);
} else if (evt instanceof MonitorContendedEnterEvent) {
return new F3MonitorContendedEnterEvent(f3vm, (MonitorContendedEnterEvent)evt);
} else if (evt instanceof MonitorContendedEnteredEvent) {
return new F3MonitorContendedEnteredEvent(f3vm, (MonitorContendedEnteredEvent)evt);
} else if (evt instanceof MonitorWaitEvent) {
return new F3MonitorWaitEvent(f3vm, (MonitorWaitEvent)evt);
} else if (evt instanceof MonitorWaitedEvent) {
return new F3MonitorWaitedEvent(f3vm, (MonitorWaitedEvent)evt);
} else if (evt instanceof StepEvent) {
return new F3StepEvent(f3vm, (StepEvent)evt);
} else if (evt instanceof ThreadDeathEvent) {
return new F3ThreadDeathEvent(f3vm, (ThreadDeathEvent)evt);
} else if (evt instanceof ThreadStartEvent) {
return new F3ThreadStartEvent(f3vm, (ThreadStartEvent)evt);
} else if (evt instanceof VMDeathEvent) {
return new F3VMDeathEvent(f3vm, (VMDeathEvent)evt);
} else if (evt instanceof VMDisconnectEvent) {
return new F3VMDisconnectEvent(f3vm, (VMDisconnectEvent)evt);
} else if (evt instanceof VMStartEvent) {
return new F3VMStartEvent(f3vm, (VMStartEvent)evt);
} else if (evt instanceof WatchpointEvent) {
return new F3WatchpointEvent(f3vm, (WatchpointEvent)evt);
} else if (evt instanceof LocatableEvent) {
return new F3LocatableEvent(f3vm, (LocatableEvent)evt);
} else {
return new F3Event(f3vm, evt);
}
}
示例2: jdiVMStart
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
@Override
public void jdiVMStart(final VMStartEvent event)
{
if (!override && !owner.isStarted())
{
return;
}
try
{
vmThreadId = manager().executionModel().valueFactory()
.createThread(event.thread().uniqueID(), event.thread().name());
// dispatcher().dispatchSystemStart(vmThreadId);
}
catch (final Throwable e)
{
JiveDebugPlugin.log(e);
}
}
示例3: handleVMStart
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
@Override
public void handleVMStart(final VMStartEvent event)
{
if (isActive())
{
jdiHandler().jdiVMStart(event);
}
super.handleVMStart(event);
}
示例4: vmEvents
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
/**
* Gets the observable object for vm events.
* @return the observable object for vm events
*/
@Override
public Observable<DebugEvent> vmEvents() {
return this.events().filter(debugEvent -> debugEvent.event instanceof VMStartEvent
|| debugEvent.event instanceof VMDisconnectEvent
|| debugEvent.event instanceof VMDeathEvent);
}
示例5: vmStartEvent
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public void vmStartEvent(VMStartEvent evt) {
synchronized (listeners) {
for (EventNotifier en : listeners) {
en.vmStartEvent(evt);
}
}
}
示例6: jdiVMStart
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
@Override
public void jdiVMStart(final VMStartEvent event)
{
//
this.currentEvent = null;
this.currentThread = null;
//
this.currentEvent = null;
this.currentThread = null;
}
示例7: main
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public static void main(String[] args)
throws IOException, InterruptedException {
//VirtualMachine vm = launchTarget(sb.toString());
VirtualMachine vm = launchTarget(CLASS_NAME);
System.out.println("Vm launched");
// process events
EventQueue eventQueue = vm.eventQueue();
// resume the vm
Process process = vm.process();
// Copy target's output and error to our output and error.
Thread outThread = new StreamRedirectThread("out reader", process.getInputStream());
Thread errThread = new StreamRedirectThread("error reader", process.getErrorStream());
errThread.start();
outThread.start();
boolean connected = true;
int watched = 0;
while (connected) {
EventSet eventSet = eventQueue.remove();
for (Event event : eventSet) {
System.out.println("FieldMonitor-main receives: "+event);
if (event instanceof VMStartEvent) {
addClassWatch(vm);
} else if (event instanceof VMDeathEvent
|| event instanceof VMDisconnectEvent) {
// exit
connected = false;
} else if (event instanceof ClassPrepareEvent) {
// watch field on loaded class
System.out.println("ClassPrepareEvent");
ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
ReferenceType refType = classPrepEvent
.referenceType();
addFieldWatch(vm, refType);
} else if (event instanceof ModificationWatchpointEvent) {
watched++;
System.out.println("sleep for 500 ms");
Thread.sleep(500);
ModificationWatchpointEvent modEvent = (ModificationWatchpointEvent) event;
System.out.println("old="
+ modEvent.valueCurrent());
System.out.println("new=" + modEvent.valueToBe());
}
}
System.out.println("resume...");
eventSet.resume();
}
// Shutdown begins when event thread terminates
try {
errThread.join(); // Make sure output is forwarded
outThread.join();
} catch (InterruptedException exc) {
// we don't interrupt
}
if (watched != 11) { // init + 10 modifications in TestPostFieldModification class
throw new Error("Expected to receive 11 times ModificationWatchpointEvent, but got "+watched);
}
}
示例8: F3VMStartEvent
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public F3VMStartEvent(F3VirtualMachine f3vm, VMStartEvent underlying) {
super(f3vm, underlying);
}
示例9: underlying
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
@Override
protected VMStartEvent underlying() {
return (VMStartEvent) super.underlying();
}
示例10: vmStartEvent
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public void vmStartEvent(VMStartEvent e) {
}
示例11: VisitableVMStartEvent
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
public VisitableVMStartEvent(VMStartEvent event) {
this.event = event;
}
示例12: visit
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
@Override
public void visit(VMStartEvent event) {
}
示例13: visit
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
/**
* Visit a {@code VMStartEvent}.
*
* @param event Event to visit
*/
void visit(VMStartEvent event);
示例14: jdiVMStart
import com.sun.jdi.event.VMStartEvent; //导入依赖的package包/类
/**
* Notification of initialization of a target VM.
*/
void jdiVMStart(VMStartEvent event);