Package org.apache.tapestry5.ioc.def

Examples of org.apache.tapestry5.ioc.def.ModuleDef


        train_getServiceInterface(resources, StringHolder.class);
        train_getService(resources, "ToUpperCaseStringHolder", StringHolder.class, new ToUpperCaseStringHolder());

        replay();

        ModuleDef def = new DefaultModuleDefImpl(MutlipleAutobuildServiceConstructorsModule.class, logger,
                                                 classFactory);

        ServiceDef sd = def.getServiceDef("StringHolder");

        assertNotNull(sd);

        ObjectCreator oc = sd.createServiceCreator(resources);
View Full Code Here


    {
        Logger logger = mockLogger();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, logger, classFactory);

        ServiceDef sd = md.getServiceDef("Runnable");

        assertTrue(sd.isEagerLoad());

        verify();
    }
View Full Code Here

    {
        Logger logger = mockLogger();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);

        ServiceDef sd = md.getServiceDef("Greeter");

        assertListsEquals(CollectionFactory.newList(sd.getMarkers()), BlueMarker.class);

        verify();
    }
View Full Code Here

    {
        Logger logger = mockLogger();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);

        ServiceDef sd = md.getServiceDef("RedGreeter");

        assertListsEquals(CollectionFactory.newList(sd.getMarkers()), RedMarker.class);

        verify();
    }
View Full Code Here

    {
        Logger logger = mockLogger();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);

        ServiceDef sd = md.getServiceDef("SecondRedGreeter");

        assertListsEquals(CollectionFactory.newList(sd.getMarkers()), RedMarker.class);

        verify();
    }
View Full Code Here

    {
        Logger logger = mockLogger();

        replay();

        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);

        ServiceDef sd = md.getServiceDef("SurprisinglyBlueGreeter");

        // BlueMarker from ServiceBindingOptions, RedMarker from @Marker on class

        Set<Class> markers = sd.getMarkers();
View Full Code Here

        SymbolProvider provider = new SingleKeySymbolProvider(InternalConstants.TAPESTRY_ALIAS_MODE_SYMBOL, "servlet");
        ContributionDef contribution = new SyntheticSymbolSourceContributionDef("AliasMode", provider,
                                                                                "before:ApplicationDefaults");

        ModuleDef module = new SyntheticModuleDef(contribution);

        builder.add(module);

        registry = builder.build();
View Full Code Here

        SymbolProvider provider = new SingleKeySymbolProvider(InternalConstants.TAPESTRY_ALIAS_MODE_SYMBOL, "servlet");
        ContributionDef contribution = new SyntheticSymbolSourceContributionDef("AliasMode", provider,
                                                                                "before:ApplicationDefaults");

        ModuleDef module = new SyntheticModuleDef(contribution);

        builder.add(module);

        registry = builder.build();
View Full Code Here

            addedModuleClasses.add(c);

            logger.info("Adding module definition for " + c);

            ModuleDef def = new DefaultModuleDefImpl(c, logger, proxyFactory);
            add(def);

            SubModule annotation = ((AnnotatedElement) c).getAnnotation(SubModule.class);

            if (annotation == null)
View Full Code Here

            addedModuleClasses.add(c);

            logger.info("Adding module definition for " + c);

            ModuleDef def = new DefaultModuleDefImpl(c, logger, proxyFactory);
            add(def);

            SubModule annotation = ((AnnotatedElement) c).getAnnotation(SubModule.class);

            if (annotation == null)
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.def.ModuleDef

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.