@Override
    public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
        unwrapArgs(method.getParameterTypes(), args);
        if (!mixinHandlers.isEmpty()) {
            MethodSignature methodSignature = MethodSignature.forMethod(method);
            if (mixinHandlers.containsKey(methodSignature)) {
                return mixinHandlers.get(methodSignature).invoke(proxy, method, args);
            }
        }

        final InvocationHandler invocationHandler = handlers.get(MethodSignature.forMethod(method));
        if (invocationHandler != null) {
            try {
                return invocationHandler.invoke(proxy, method, args);
            } catch (XPathExpressionException e) {
                throw new XBPathException(e, method, "??");
            }
        }

        throw new IllegalArgumentException("I don't known how to invoke method " + method + ". Did you forget to add a XB*-annotation or to register a mixin?");
    }
@ Override public Object invoke ( final Object proxy , final Method method , final Object [ ] args ) throws Throwable { unwrapArgs ( method . getParameterTypes ( ) , args ) ; if ( ! mixinHandlers . isEmpty ( ) ) { MethodSignature methodSignature = MethodSignature . forMethod ( method ) ; if ( mixinHandlers . containsKey ( methodSignature ) ) { return mixinHandlers . get ( methodSignature ) . invoke ( proxy , method , args ) ; } } final InvocationHandler invocationHandler = handlers . get ( MethodSignature . forMethod ( method ) ) ; if ( invocationHandler != null ) { try { return invocationHandler . invoke ( proxy , method , args ) ; } catch ( XPathExpressionException e ) { throw new XBPathException ( e , method , "??" ) ; } } throw new IllegalArgumentException ( "I don't known how to invoke method " + method + ". Did you forget to add a XB*-annotation or to register a mixin?" ) ; }
{@inheritDoc}