Package org.apache.tapestry5.ioc.def

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


        if (type == null)
            throw new RuntimeException(IOCMessages.noContributionParameter(method));

        Set<Class> markers = extractMarkers(method, Contribute.class);

        ContributionDef2 def = new ContributionDefImpl(serviceId, method, proxyFactory, serviceInterface, markers);

        contributionDefs.add(def);
    }
View Full Code Here


            for (ContributionDef cd : contributionDefs)
            {
                String serviceId = cd.getServiceId();

                ContributionDef2 cd2 = InternalUtils.toContributionDef2(cd);

                if (cd2.getServiceId() != null)
                {
                    if (!serviceIdToModule.containsKey(serviceId)) { throw new IllegalArgumentException(
                            IOCMessages.contributionForNonexistentService(cd)); }
                }
                else if (!isContributionForExistentService(module, cd2)) { throw new IllegalArgumentException(
View Full Code Here

    private void addStartupDef(Method method)
    {
        Set<Class> markers = Collections.emptySet();
       
        ContributionDef2 def = new ContributionDefImpl("RegistryStartup", method, classFactory, Runnable.class, markers);
       
        contributionDefs.add(def);
    }
View Full Code Here

        if (type == null)
            throw new RuntimeException(IOCMessages.noContributionParameter(method));

        Set<Class> markers = extractMarkers(method, Contribute.class);

        ContributionDef2 def = new ContributionDefImpl(serviceId, method, classFactory, serviceInterface, markers);

        contributionDefs.add(def);
    }
View Full Code Here

    {
        Set<ContributionDef2> result = CollectionFactory.newSet();

        for (ContributionDef next : moduleDef.getContributionDefs())
        {
            ContributionDef2 def = InternalUtils.toContributionDef2(next);

            if (serviceDef.getServiceId().equalsIgnoreCase(def.getServiceId()))
            {
                result.add(def);
            }
            else
            {
View Full Code Here

    public static ContributionDef2 toContributionDef2(final ContributionDef contribution)
    {
        if (contribution instanceof ContributionDef2)
            return (ContributionDef2) contribution;

        return new ContributionDef2()
        {

            public Set<Class> getMarkers()
            {
                return Collections.emptySet();
View Full Code Here

     * Invoked at object creation, or when there are updates to class files (i.e., invalidation), to create a new set of
     * Javassist class pools and loaders.
     */
    private void initializeService()
    {
        ClassFactoryClassPool classPool = new ClassFactoryClassPool(parent);

        // For TAPESTRY-2561, we're introducing a class loader between the parent (i.e., the
        // context class loader), and the component class loader, to try and prevent the deadlocks
        // that we've been seeing.

        ClassLoader threadDeadlockBuffer = new URLClassLoader(new URL[0], parent);

        loader = new PackageAwareLoader(threadDeadlockBuffer, classPool);

        ClassPath path = new LoaderClassPath(loader);

        classPool.appendClassPath(path);

        classSource = new CtClassSourceImpl(classPool, loader);

        try
        {
View Full Code Here

        catch (Exception ex)
        {
            throw new RuntimeException(ex);
        }

        classFactory = new ClassFactoryImpl(loader, classPool, classSource, logger);

        classToPriorTransformException.clear();
    }
View Full Code Here

        ClassPath path = new LoaderClassPath(loader);

        classPool.appendClassPath(path);

        classSource = new CtClassSourceImpl(classPool, loader);

        try
        {
            loader.addTranslator(classPool, this);
        }
View Full Code Here

    @Primary
    private StackTraceElementAnalyzer frameAnalyzer;

    void setupRender()
    {
        ExceptionAnalysis analysis = analyzer.analyze(exception);

        stack = analysis.getExceptionInfos();

        toggleId = renderSupport.allocateClientId("toggleStack");
    }
View Full Code Here

TOP

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

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.