Code example for Method

Methods: invoke

0
        method.setAccessible(true);
    } 
 
    public void onEvent(Object event) {
        try { 
            method.invoke(instance, event);
        } catch (InvocationTargetException e) {
            Ln.e(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } 
    } 
 
    public Object getInstance() {
        return instance;
    } 
 
    @Override 
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;