// Path: src/main/java/net/openbyte/event/meta/Event.java
// public interface Event {
// }


import net.openbyte.event.meta.Event;
import net.openbyte.event.meta.EventListener;
import java.lang.reflect.Method;
import java.util.ArrayList;
    }

    public void callEvent(Event event) throws Exception {
        ArrayList<Method> methodsRelated = new ArrayList<Method>();
        for (Class<?> listener : listenerClasses) {
            for (Method method : listener.getDeclaredMethods()) {
                for (Class<?> parameterType : method.getParameterTypes()) {
                    if(parameterType == event.getClass()) {
                        methodsRelated.add(method);
                    }
                }
            }
        }
        Class<?> eventClass = event.getClass();
        for (Method method : methodsRelated) {
            Object classInstance = method.getDeclaringClass().newInstance();
            method.invoke(classInstance, eventClass.cast(event));
        }
    }

    public static void main(String[] args) throws Exception {
        System.out.println("Setting up testing objects...");
        EventManager.init();
        System.out.println("Registering the listener...");
        EventManager.getManager().registerListener(TestEventListener.class);
        System.out.println("Running dummy event tests...");
        DummyEvent event = new DummyEvent();
        EventManager.getManager().callEvent(event);
    }

// Path: src/main/java/net/openbyte/event/meta/Event.java
// public interface Event {
// }


// Path: src/main/java/net/openbyte/event/handle/EventManager.java
import net.openbyte.event.meta.Event;
import net.openbyte.event.meta.EventListener;
import java.lang.reflect.Method;
import java.util.ArrayList;

    }

    public void callEvent(Event event) throws Exception {
        ArrayList<Method> methodsRelated = new ArrayList<Method>();
        for (Class<?> listener : listenerClasses) {
            for (Method method : listener.getDeclaredMethods()) {
                for (Class<?> parameterType : method.getParameterTypes()) {
                    if(parameterType == event.getClass()) {
                        methodsRelated.add(method);
                    }
                }
            }
        }
        Class<?> eventClass = event.getClass();
        for (Method method : methodsRelated) {
            Object classInstance = method.getDeclaringClass().newInstance();
            method.invoke(classInstance, eventClass.cast(event));
        }
    }

    public static void main(String[] args) throws Exception {
        System.out.println("Setting up testing objects...");
        EventManager.init();
        System.out.println("Registering the listener...");
        EventManager.getManager().registerListener(TestEventListener.class);
        System.out.println("Running dummy event tests...");
        DummyEvent event = new DummyEvent();
        EventManager.getManager().callEvent(event);
    }

    public static class DummyEvent implements Event {