Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.MethodInvocationResult


                    public void advise(ComponentMethodInvocation invocation)
                    {
                        // Don't even bother with proceed() this time, which is OK (but
                        // somewhat rare).

                        MethodInvocationResult result = targetMethodAccess.invoke(invocation.getInstance(), invocation
                                .getParameter(0), invocation.getParameter(1));

                        invocation.overrideResult(result.getReturnValue());
                    }
                });
            }
        });
View Full Code Here


        public MethodInvocationResult invoke(Object target, Object... arguments)
        {
            final org.apache.tapestry5.plastic.MethodInvocationResult plasticResult = handle.invoke(target, arguments);

            return new MethodInvocationResult()
            {
                public void rethrow()
                {
                    plasticResult.rethrow();
                }
View Full Code Here

        public MethodInvocationResult invoke(Object target, Object... arguments)
        {
            final org.apache.tapestry5.plastic.MethodInvocationResult plasticResult = handle.invoke(target, arguments);

            return new MethodInvocationResult()
            {
                public void rethrow()
                {
                    plasticResult.rethrow();
                }
View Full Code Here

        public void advise(ComponentMethodInvocation invocation)
        {
            logger.debug(String.format("%s invoking default method %s", invocation.getComponentResources()
                    .getCompleteId(), defaultMethodAccess));

            MethodInvocationResult result = defaultMethodAccess.invoke(invocation.getInstance());

            result.rethrow();

            getConduit(invocation, conduitAccess).setDefault(result.getReturnValue());

            invocation.proceed();
        }
View Full Code Here

        {
            public void advise(ComponentMethodInvocation invocation)
            {
                invocation.proceed();

                MethodInvocationResult result = access.invoke(invocation.getInstance());

                result.rethrow();
            }
        };
    }
View Full Code Here

        {
            event.setMethodDescription(methodIdentifier);

            // As currently implemented, MethodAccess objects ignore excess parameters.

            MethodInvocationResult result = access.invoke(instance, writer);

            result.rethrow();

            event.storeResult(result.getReturnValue());
        }
View Full Code Here

    public void invokeEventHandlerMethod(ComponentEvent event, Object instance)
    {
        event.setMethodDescription(identifier);

        MethodInvocationResult result = access.invoke(instance, constructParameters(event));

        result.rethrow();

        event.storeResult(result.getReturnValue());
    }
View Full Code Here

                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        invocation.proceed();

                        MethodInvocationResult invocationResult = pvnaAccess.invoke(invocation.getInstance());

                        assertFalse(invocationResult.isFail(), "fail should be false, no checked exception thrown");
                    }
                });
            }
        });
View Full Code Here

                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        invocation.proceed();

                        MethodInvocationResult invocationResult = targetAccess.invoke(invocation.getInstance());

                        assertTrue(invocationResult.isFail(), "fail should be true; checked exception thrown");

                        SQLException ex = invocationResult.getThrown(SQLException.class);

                        assertNotNull(ex);
                        assertEquals(ex.getMessage(), "From publicVoidThrowsException()");
                    }
                });
View Full Code Here

                        // the parameters to the original method, so that they can be mapped
                        // to some other method (including a MethodAccess).

                        Integer parameter = (Integer) invocation.getParameter(0);

                        MethodInvocationResult result = incrementerAccess.invoke(invocation.getInstance(), parameter);

                        invocation.overrideResult(result.getReturnValue());
                    }
                });
            }
        });
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.MethodInvocationResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.