Package org.apache.tapestry5.internal.services

Examples of org.apache.tapestry5.internal.services.Instantiator


            return binder;
        }

        // Ok, so perhaps this is a qualified name for an informal parameter of the mixin.

        Instantiator instantiator = mixinIdToInstantiator.get(mixinId);

        assert instantiator != null;

        return bindInformalParameter(qualifiedParameterName, mixinId, parameterName, instantiator.getModel());
    }
View Full Code Here


    public int addMixinsToElement(ComponentPageElement newElement)
    {
        for (Map.Entry<String, Instantiator> entry : mixinIdToInstantiator.entrySet())
        {
            String mixinId = entry.getKey();
            Instantiator instantiator = entry.getValue();

            newElement.addMixin(mixinId, instantiator, mixinsIdToOrderConstraints.get(mixinId));
        }

        return mixinIdToInstantiator.size();
View Full Code Here

    @Test
    public void render_informal_parameters_no_bindings()
    {
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        MarkupWriter writer = mockMarkupWriter();
        TypeCoercer coercer = mockTypeCoercer();
        ComponentModel model = mockComponentModel();

        train_getModel(ins, model);
View Full Code Here

    @Test
    public void render_informal_parameters_skips_formal_parameters()
    {
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        MarkupWriter writer = mockMarkupWriter();
        ComponentModel model = mockComponentModel();
        ParameterModel pmodel = mockParameterModel();
        Binding binding = mockBinding();
View Full Code Here

    {
        for (String className : instantiator.getModel().getMixinClassNames())
        {
            assembly.weight++;

            Instantiator mixinInstantiator = instantiatorSource.getInstantiator(className);

            ComponentModel model = instantiator.getModel();
            element.addMixin(InternalUtils.lastTerm(className), mixinInstantiator, model.getOrderForMixin(className));
        }
    }
View Full Code Here

        PageResources pr = mockPageResources(logger, eventLogger);

        train_getLogger(model, logger);
        train_isDebugEnabled(eventLogger, false);

        Instantiator ins = mockInstantiator(component, model);
        Instantiator mixinInstantiator = mockInstantiator(mixin, mixinModel);

        train_getComponentClassName(mixinModel, "foo.Fred");

        replay();
View Full Code Here

        verify();
    }

    private Instantiator mockInstantiator(Component component, ComponentModel model)
    {
        Instantiator ins = newMock(Instantiator.class);

        expect(ins.getModel()).andReturn(model).anyTimes();

        expect(ins.newInstance(EasyMock.isA(InternalComponentResources.class)))
                .andReturn(component);

        return ins;
    }
View Full Code Here

        PageResources pr = mockPageResources(logger, eventLogger);

        train_getLogger(model, logger);
        train_isDebugEnabled(eventLogger, false);

        Instantiator ins = mockInstantiator(component, model);

        replay();


        ComponentPageElement cpe = new ComponentPageElementImpl(page, ins, pr);
View Full Code Here

        Block block = mockBlock();
        Logger logger = mockLogger();
        Logger eventLogger = mockLogger();
        PageResources pr = mockPageResources(logger, eventLogger);

        Instantiator ins = mockInstantiator(component, model);

        train_getLogger(model, logger);
        train_isDebugEnabled(eventLogger, false);

        replay();
View Full Code Here

        Binding binding = mockBinding();
        Logger logger = mockLogger();
        Logger eventLogger = mockLogger();
        PageResources pr = mockPageResources(logger, eventLogger);

        Instantiator ins = mockInstantiator(component, model);

        train_getLogger(model, logger);
        train_isDebugEnabled(eventLogger, false);

        train_getParameterModel(model, "barney", null);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.services.Instantiator

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.