Code example for Method

Methods: setAccessiblegetName

    public ObserverMethodListener(Object instance, Method method) {
        this.instance = instance;
        this.method = method;
        //This descriptor is used in the equals and hashcode method to compare 
        //methods between super-classes, subclasses and interface declarations. 
        this.descriptor = method.getName() + ':' + RuntimeSupport.makeDescriptor(method);
    public void onEvent(Object event) {
        try { 
            method.invoke(instance, event);
        } catch (InvocationTargetException e) {
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
    public Object getInstance() {
Stop searching for code, let great code find you!  Add Codota to your java IDE