Package org.apache.tapestry.ioc.services

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


    }

    @Test
    public void property_order_on_subclass()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBeanSubclass.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
View Full Code Here


    }

    @Test
    public void properties_with_order_annotation_filtered()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(PropertyOrderBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
View Full Code Here

        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

        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

    }

    @Test
    public void property_order_basic()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void property_order_on_subclass()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBeanSubclass.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void properties_with_order_annotation_filtered()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(PropertyOrderBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

        return getAdapter(instance.getClass());
    }

    public ClassPropertyAdapter getAdapter(Class forClass)
    {
        ClassPropertyAdapter result = _adapters.get(forClass);

        if (result == null)
        {
            result = buildAdapter(forClass);
            _adapters.put(forClass, result);
View Full Code Here

    private ExceptionInfo extractInfo(Throwable t)
    {
        Map<String, Object> properties = newMap();

        ClassPropertyAdapter adapter = _propertyAccess.getAdapter(t);

        for (String name : adapter.getPropertyNames())
        {
            if (_throwableProperties.contains(name))
                continue;

            Object value = adapter.get(t, name);

            if (value == null)
                continue;

            // An interesting property, let's save it for the analysis.
View Full Code Here

    }

    @Test
    public void clear_wipes_internal_cache()
    {
        ClassPropertyAdapter cpa1 = _access.getAdapter(Bean.class);
        ClassPropertyAdapter cpa2 = _access.getAdapter(Bean.class);

        assertSame(cpa2, cpa1);

        _access.clearCache();

        ClassPropertyAdapter cpa3 = _access.getAdapter(Bean.class);

        assertNotSame(cpa3, cpa1);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.services.ClassPropertyAdapter

Copyright © 2018 www.massapicom. 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.