Examples of extendMethod()


Examples of org.apache.tapestry5.services.ClassTransformation.extendMethod()

        train_getFieldType(ct, "_fred", "foo.Bar");

        expect(ct.addField(Modifier.PRIVATE, "foo.Bar", "_fred_default")).andReturn(
                "_$fred_default");

        ct.extendMethod(CONTAINING_PAGE_DID_LOAD_SIGNATURE, "_$fred_default = _fred;");
        ct.extendMethod(CONTAINING_PAGE_DID_DETACH_SIGNATURE, "_fred = _$fred_default;");

        replay();

        new UnclaimedFieldWorker().transform(ct, model);
View Full Code Here

Examples of org.apache.tapestry5.services.ClassTransformation.extendMethod()

        expect(ct.addField(Modifier.PRIVATE, "foo.Bar", "_fred_default")).andReturn(
                "_$fred_default");

        ct.extendMethod(CONTAINING_PAGE_DID_LOAD_SIGNATURE, "_$fred_default = _fred;");
        ct.extendMethod(CONTAINING_PAGE_DID_DETACH_SIGNATURE, "_fred = _$fred_default;");

        replay();

        new UnclaimedFieldWorker().transform(ct, model);
View Full Code Here

Examples of org.apache.tapestry5.services.ClassTransformation.extendMethod()

        train_getFieldType(ct, "myfield", CLASS_NAME);
        train_getResourcesFieldName(ct, "resources");
        expect(annotation.value()).andReturn("");
        ct.makeReadOnly("myfield");

        ct.extendMethod(same(TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE),
                        contains(
                                "myfield = (" + CLASS_NAME + ") resources.getEmbeddedComponent(\"myfield\");"));


        replay();
View Full Code Here

Examples of org.apache.tapestry5.services.ClassTransformation.extendMethod()

        train_getFieldType(ct, "myfield", CLASS_NAME);
        train_getResourcesFieldName(ct, "resources");
        expect(annotation.value()).andReturn("id_provided_as_annotation").atLeastOnce();
        ct.makeReadOnly("myfield");

        ct.extendMethod(same(TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE),
                        contains(
                                "myfield = (" + CLASS_NAME + ") resources.getEmbeddedComponent(\"id_provided_as_annotation\");"));

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