Package org.apache.tapestry.services

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


        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(
View Full Code Here

        train_getFieldAnnotation(ct, "fred", Inject.class, fredAnnotation);

        train_value(fredAnnotation, "");

        ct.makeReadOnly("fred");
        ct.claimField("fred", fredAnnotation);

        train_getFieldAnnotation(ct, "_barneyBlock", Inject.class, barneyAnnotation);
        train_value(barneyAnnotation, "barney");

        ct.makeReadOnly("_barneyBlock");
View Full Code Here

        train_getFieldAnnotation(ct, "_barneyBlock", Inject.class, barneyAnnotation);
        train_value(barneyAnnotation, "barney");

        ct.makeReadOnly("_barneyBlock");
        ct.claimField("_barneyBlock", barneyAnnotation);

        train_extendMethod(
                ct,
                TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
                "{",
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

        train_addInjectedField(ct, Resource.class, "baseResource", r, "res");
        train_getResourcesFieldName(ct, "resources");

        ct.makeReadOnly("_fred");
        ct.claimField("_fred", annotation);

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

        replay();

        ClassTransformation ct = createClassTransformation(FindFieldClass.class, log);

        ct.claimField("_booleanValue", this);

        checkFindFields(ct, "boolean");

        verify();
    }
View Full Code Here

        replay();

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

        ct.claimField("_annotatedField", this);

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

        assertTrue(fields.isEmpty());
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.