All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jpower.event.RegisteredMethod Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package jpower.event;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class RegisteredMethod
{

    private final Method method;

    public RegisteredMethod(Method method)
    {
        this.method = method;
    }

    public void invoke(Object instance, Object event)
    {
        try
        {
            method.invoke(instance, event);
        }
        catch (IllegalAccessException | InvocationTargetException e)
        {
        }
    }

    public Class getEventType()
    {
        return method.getParameterTypes()[0];
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy