Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.Invokable.invoke()


            {
                throw new RuntimeException("Future failure!");
            }
        };

        StringHolder holder = parallelExecutor.invoke(StringHolder.class, inv);

        assertEquals(holder.toString(), "FutureThunk[org.apache.tapestry5.ioc.StringHolder]");

        try
        {
View Full Code Here


                    return holder;
                }
            };

            thunks.add(parallelExecutor.invoke(StringHolder.class, inv));
        }

        for (int j = 0; j < 2; j++)
        {
            for (int i = 0; i < count; i++)
View Full Code Here

            {
                throw new RuntimeException("Future failure!");
            }
        };

        StringHolder holder = parallelExecutor.invoke(StringHolder.class, inv);

        assertEquals(holder.toString(), "FutureThunk[org.apache.tapestry5.ioc.StringHolder]");

        try
        {
View Full Code Here

            // Take the value passed to this method and push it onto the stack.

            builder.loadArgument(0);
            builder.boxPrimitive(typeName);

            builder.invoke(FieldConduit.class, void.class, "set", Object.class, InstanceContext.class, Object.class);

            if (isWriteBehindEnabled())
            {
                builder.loadThis().loadArgument(0).putField(className, node.name, typeName);
            }
View Full Code Here

            // Now push the instance context on the stack

            pushInstanceContextFieldOntoStack(builder);

            builder.invoke(FieldConduit.class, Object.class, "get", Object.class, InstanceContext.class).castOrUnbox(
                    typeName);

            if (writeBehindEnabled)
            {
                // Dupe the value, then push this, then swap
View Full Code Here

                        block.addCatch(exceptionName, new InstructionBuilderCallback()
                        {
                            public void doBuild(InstructionBuilder builder)
                            {
                                builder.loadThis().swap();
                                builder.invoke(AbstractMethodInvocation.class, MethodInvocation.class,
                                        "setCheckedException", Exception.class);

                                builder.returnResult();
                            }
                        });
View Full Code Here

            {
                public void doBuild(final LocalVariable invocation, InstructionBuilder builder)
                {
                    builder.dupe().storeVariable(invocation);

                    builder.invoke(AbstractMethodInvocation.class, MethodInvocation.class, "proceed");

                    if (description.checkedExceptionTypes.length > 0)
                    {
                        builder.invoke(MethodInvocation.class, boolean.class, "didThrowCheckedException");
View Full Code Here

                    builder.invoke(AbstractMethodInvocation.class, MethodInvocation.class, "proceed");

                    if (description.checkedExceptionTypes.length > 0)
                    {
                        builder.invoke(MethodInvocation.class, boolean.class, "didThrowCheckedException");

                        builder.when(Condition.NON_ZERO, new InstructionBuilderCallback()
                        {
                            public void doBuild(InstructionBuilder builder)
                            {
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);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.