EventImpl createEvent()

in src/main/java/com/jetbrains/jdi/EventSetImpl.java [728:809]


    EventImpl createEvent(JDWP.Event.Composite.Events evt) {
        JDWP.Event.Composite.Events.EventsCommon comm = evt.aEventsCommon;
        switch (evt.eventKind) {
            case JDWP.EventKind.THREAD_START:
                return new ThreadStartEventImpl(
                      (JDWP.Event.Composite.Events.ThreadStart)comm);

            case JDWP.EventKind.THREAD_END:
                return new ThreadDeathEventImpl(
                      (JDWP.Event.Composite.Events.ThreadDeath)comm);

            case JDWP.EventKind.EXCEPTION:
                return new ExceptionEventImpl(
                      (JDWP.Event.Composite.Events.Exception)comm);

            case JDWP.EventKind.BREAKPOINT:
                return new BreakpointEventImpl(
                      (JDWP.Event.Composite.Events.Breakpoint)comm);

            case JDWP.EventKind.METHOD_ENTRY:
                return new MethodEntryEventImpl(
                      (JDWP.Event.Composite.Events.MethodEntry)comm);

            case JDWP.EventKind.METHOD_EXIT:
                return new MethodExitEventImpl(
                      (JDWP.Event.Composite.Events.MethodExit)comm);

            case JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE:
                return new MethodExitEventImpl(
                      (JDWP.Event.Composite.Events.MethodExitWithReturnValue)comm);

            case JDWP.EventKind.FIELD_ACCESS:
                return new AccessWatchpointEventImpl(
                      (JDWP.Event.Composite.Events.FieldAccess)comm);

            case JDWP.EventKind.FIELD_MODIFICATION:
                return new ModificationWatchpointEventImpl(
                      (JDWP.Event.Composite.Events.FieldModification)comm);

            case JDWP.EventKind.SINGLE_STEP:
                return new StepEventImpl(
                      (JDWP.Event.Composite.Events.SingleStep)comm);

            case JDWP.EventKind.CLASS_PREPARE:
                return new ClassPrepareEventImpl(
                      (JDWP.Event.Composite.Events.ClassPrepare)comm);

            case JDWP.EventKind.CLASS_UNLOAD:
                return new ClassUnloadEventImpl(
                      (JDWP.Event.Composite.Events.ClassUnload)comm);

            case JDWP.EventKind.MONITOR_CONTENDED_ENTER:
                return new MonitorContendedEnterEventImpl(
                      (JDWP.Event.Composite.Events.MonitorContendedEnter)comm);

            case JDWP.EventKind.MONITOR_CONTENDED_ENTERED:
                return new MonitorContendedEnteredEventImpl(
                      (JDWP.Event.Composite.Events.MonitorContendedEntered)comm);

            case JDWP.EventKind.MONITOR_WAIT:
                return new MonitorWaitEventImpl(
                      (JDWP.Event.Composite.Events.MonitorWait)comm);

            case JDWP.EventKind.MONITOR_WAITED:
                return new MonitorWaitedEventImpl(
                      (JDWP.Event.Composite.Events.MonitorWaited)comm);

            case JDWP.EventKind.VM_START:
                return new VMStartEventImpl(
                      (JDWP.Event.Composite.Events.VMStart)comm);

            case JDWP.EventKind.VM_DEATH:
                return new VMDeathEventImpl(
                      (JDWP.Event.Composite.Events.VMDeath)comm);

            default:
                // Ignore unknown event types
                System.err.println("Ignoring event cmd " +
                                   evt.eventKind + " from the VM");
                return null;
        }
    }