Code example for Method

Methods: getDeclaringClass, invoke

0
    } 
 
    @Override 
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
    { 
        if (method.getDeclaringClass().isAssignableFrom(this.filter.getClass())) {
            return method.invoke(this.filter, args);
        } 
 
        return null; 
    } 
 
    public static AllFilter getProxy(Object listener)
    { 
        return (AllFilter) Proxy.newProxyInstance(AllFilter.class.getClassLoader(),
            new Class[] {AllFilter.class}, new AllFilterInvocationHandler(listener));
    } 
}