Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ClassTransformation.makeReadOnly()


        // tests for that.

        ct
                .extendConstructor("myField = (java.lang.Object) as.findAsset(rez.getBaseResource(), \"foo.gif\", rez.getLocale());");

        ct.makeReadOnly(fieldName);

        replay();

        InjectionProvider provider = new AssetInjectionProvider(symbolSource, assetSource);
View Full Code Here


        train_resolveMixinTypeToClassName(resolver, "Bar", "foo.bar.BazMixin");

        model.addMixinClassName("foo.bar.BazMixin");

        transformation.makeReadOnly("fred");

        train_getResourcesFieldName(transformation, "rez");

        train_extendMethod(
                transformation,
View Full Code Here

        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");

        model.addMixinClassName("foo.bar.Baz");

        transformation.makeReadOnly("fred");

        train_getResourcesFieldName(transformation, "rez");

        train_extendMethod(
                transformation,
View Full Code Here

        // tests for that.

        ct
                .extendConstructor("myField = (java.lang.Object) as.findAsset(rez.getBaseResource(), \"foo.gif\", rez.getLocale());");

        ct.makeReadOnly(fieldName);

        replay();

        InjectionProvider provider = new AssetInjectionProvider(symbolSource, assetSource);
View Full Code Here

        train_getFieldAnnotation(ct, fredFieldName, Inject.class, fredAnnotation);

        train_getFieldAnnotation(ct, fredFieldName, Id.class, null);

        ct.makeReadOnly(fredFieldName);
        ct.claimField(fredFieldName, fredAnnotation);

        train_getFieldAnnotation(ct, barneyFieldName, Inject.class, barneyAnnotation);
        train_getFieldAnnotation(ct, barneyFieldName, Id.class, barneyId);
View Full Code Here

        train_getFieldAnnotation(ct, barneyFieldName, Inject.class, barneyAnnotation);
        train_getFieldAnnotation(ct, barneyFieldName, Id.class, barneyId);

        train_value(barneyId, "barney");

        ct.makeReadOnly(barneyFieldName);
        ct.claimField(barneyFieldName, barneyAnnotation);

        train_extendMethod(
                ct,
                TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
View Full Code Here

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

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

View Full Code Here

        train_findFieldsWithAnnotation(ct, InjectComponent.class, "myfield");
        train_getFieldAnnotation(ct, "myfield", InjectComponent.class, annotation);
        train_getFieldType(ct, "myfield", CLASS_NAME);
        train_getResourcesFieldName(ct, "resources");
        expect(annotation.value()).andReturn("id_provided_as_annotation").atLeastOnce();
        ct.makeReadOnly("myfield");
        train_extendMethod(ct, TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
                           "myfield = (" + CLASS_NAME + ") resources.getEmbeddedComponent(\"id_provided_as_annotation\");");

        replay();
View Full Code Here

        train_resolveMixinTypeToClassName(resolver, "Bar", "foo.bar.BazMixin");

        model.addMixinClassName("foo.bar.BazMixin");

        transformation.makeReadOnly("fred");

        train_getResourcesFieldName(transformation, "rez");

        train_extendMethod(
                transformation,
View Full Code Here

        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");

        model.addMixinClassName("foo.bar.Baz");

        transformation.makeReadOnly("fred");

        train_getResourcesFieldName(transformation, "rez");

        train_extendMethod(
                transformation,
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.