Examples of PropertyAccess


Examples of org.apache.tapestry.ioc.services.PropertyAccess

        String id = "mycomponentid";

        ComponentResources resources = newComponentResources();
        Component container = newComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        BindingSource bindingSource = newBindingSource();

        train_getId(resources, id);
        train_getContainer(resources, container);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        String id = "mycomponentid";

        ComponentResources resources = newComponentResources();
        Component container = newComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        PropertyAdapter propertyAdapter = newPropertyAdapter();
        BindingSource bindingSource = newBindingSource();
        Binding binding = newBinding();
        ComponentResources containerResources = newComponentResources();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        Class transformed = _classPool.toClass(targetObjectCtClass, _loader);

        Object target = ct.createInstantiator(transformed).newInstance(resources);

        PropertyAccess access = new PropertyAccessImpl();

        try
        {
            access.set(target, "value", "anything");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            // The PropertyAccess layer adds a wrapper exception around the real one.
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        Class transformed = _classPool.toClass(targetObjectCtClass, _loader);

        Object target = ct.createInstantiator(transformed).newInstance(resources);

        PropertyAccess access = new PropertyAccessImpl();

        assertEquals(access.get(target, "value"), "from constructor");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        Class transformed = _classPool.toClass(targetObjectCtClass, _loader);

        Object target = ct.createInstantiator(transformed).newInstance(resources);

        PropertyAccess access = new PropertyAccessImpl();

        assertEquals(access.get(target, "value"), "Tapestry");

        try
        {
            access.set(target, "value", "anything");
            unreachable();
        }
        catch (RuntimeException ex)
        {
            // The PropertyAccess layer adds a wrapper exception around the real one.
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        Object target = ct.createInstantiator(transformed).newInstance(resources);

        // target is no longer assignable to FieldAccessBean; its a new class from a new class
        // loader. So we use reflective access, which doesn't care about such things.

        PropertyAccess access = new PropertyAccessImpl();

        checkReplacedFieldAccess(access, target, "foo");
        checkReplacedFieldAccess(access, target, "bar");

        verify();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

    @Test
    public void integration()
    {
        Registry registry = buildRegistry();

        PropertyAccess pa = registry
                .getService("tapestry.ioc.PropertyAccess", PropertyAccess.class);

        Bean b = new Bean();

        int value = _random.nextInt();

        pa.set(b, "value", value);

        assertEquals(b.getValue(), value);
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        String id = "mycomponentid";

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();

        train_getId(resources, id);
        train_getContainer(resources, container);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

        String id = "mycomponentid";

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        PropertyAdapter propertyAdapter = newPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();
        Binding binding = mockBinding();
        ComponentResources containerResources = mockComponentResources();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.PropertyAccess

    }

    @Test
    public void caching()
    {
        PropertyAccess access = getService("tapestry.ioc.PropertyAccess", PropertyAccess.class);
        ClassFactory classFactory = getService("tapestry.ioc.ClassFactory", ClassFactory.class);

        PropBindingFactory factory = new PropBindingFactory(access, classFactory);

        TargetBean bean1 = new TargetBean();
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.