Package org.apache.tapestry5.services

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


        assertEquals(unclaimed, asList("_field1", "_zzfield"));

        try
        {
            ct.claimField("_field4", "Barney");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(
View Full Code Here


        replay();

        ClassTransformation ct = createClassTransformation(ParentClass.class, logger);

        ct.claimField("_annotatedField", this);

        List<String> fields = ct.findFieldsWithAnnotation(Retain.class);

        assertTrue(fields.isEmpty());
View Full Code Here

        List<String> unclaimed = ct.findUnclaimedFields();

        assertEquals(unclaimed, asList("_field1", "_field4", "_zzfield"));

        ct.claimField("_field4", "Fred");

        unclaimed = ct.findUnclaimedFields();

        assertEquals(unclaimed, asList("_field1", "_zzfield"));
View Full Code Here

        assertEquals(unclaimed, asList("_field1", "_zzfield"));

        try
        {
            ct.claimField("_field4", "Barney");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

        List<String> unclaimed = ct.findUnclaimedFields();

        assertEquals(unclaimed, asList("_field1", "_field4", "_zzfield"));

        ct.claimField("_field4", "Fred");

        unclaimed = ct.findUnclaimedFields();

        assertEquals(unclaimed, asList("_field1", "_zzfield"));
View Full Code Here

        assertEquals(unclaimed, asList("_field1", "_zzfield"));

        try
        {
            ct.claimField("_field4", "Barney");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

        train_getFieldType(ct, "myfield", REQUEST_CLASS_NAME);
        train_toClass(ct, REQUEST_CLASS_NAME, Request.class);

        train_provideInjection(ip, "myfield", Request.class, locator, ct, model, true);

        ct.claimField("myfield", annotation);

        replay();

        ComponentClassTransformWorker worker = new InjectWorker(locator, ip);
View Full Code Here

        train_findFieldsWithAnnotation(ct, Retain.class, "fred");

        train_getFieldAnnotation(ct, "fred", Retain.class, annotation);

        ct.claimField("fred", annotation);

        replay();

        RetainWorker worker = new RetainWorker();
View Full Code Here

        train_extendMethod(
                transformation,
                TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
                "fred = (foo.bar.Baz) rez.getMixinByClassName(\"foo.bar.BazMixin\");");

        transformation.claimField("fred", annotation);

        replay();

        new MixinWorker(resolver).transform(transformation, model);
View Full Code Here

        train_extendMethod(
                transformation,
                TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
                "fred = (foo.bar.Baz) rez.getMixinByClassName(\"foo.bar.Baz\");");

        transformation.claimField("fred", annotation);

        replay();

        new MixinWorker(resolver).transform(transformation, model);
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.