Package org.apache.tapestry5.ioc.util

Examples of org.apache.tapestry5.ioc.util.BodyBuilder.clear()


            b.addln("%s = true;", calledField);
            b.end();
            transformation.prefixMethod(method, b.toString());

            // cache the return value
            b.clear();
            b.begin();
            b.addln("%s = $_;", fieldName);
            b.end();
            transformation.extendExistingMethod(method, b.toString());
        }
View Full Code Here


        IdAllocator a = new IdAllocator();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");

        a.clear();

        assertEquals(a.allocateId("foo"), "foo");
        assertEquals(a.allocateId("foo_0"), "foo_0");
    }
View Full Code Here

    {
        Environment e = new EnvironmentImpl();

        try
        {
            e.clear();
            unreachable();
        } catch (IllegalStateException ex)
        {
            assertMessageContains(ex, "no longer supported");
        }
View Full Code Here

        replay();

        e.push(Runnable.class, r1);
        e.push(Runnable.class, r2);

        e.clear();

        assertNull(e.peek(Runnable.class));

        verify();
    }
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.