Package org.apache.tapestry5.ioc.internal.util

Examples of org.apache.tapestry5.ioc.internal.util.InjectionResources


        ClassPath path = new LoaderClassPath(loader);

        classPool.appendClassPath(path);

        classSource = new CtClassSourceImpl(classPool, loader);

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


        Map<Class, Object> resourceMap = CollectionFactory.newMap();

        resourceMap.put(ObjectLocator.class, locator);
        resourceMap.put(Logger.class, logger);

        InjectionResources injectionResources = new MapInjectionResources(resourceMap);
       
        Throwable fail = null;

        Object moduleInstance = InternalUtils.isStatic(startupMethod) ? null : moduleSource
                .getModuleBuilder();
View Full Code Here

        resourcesMap.put(Logger.class, logger);
        resourcesMap.put(ObjectLocator.class, locator);
        resourcesMap.put(OperationTracker.class, registry);

        InjectionResources resources = new MapInjectionResources(resourcesMap);

        Throwable fail = null;

        try
        {
View Full Code Here

            throw new RuntimeException(IOCMessages.noAutobuildConstructor(clazz));

        Map<Class, Object> resourcesMap = CollectionFactory.newMap();
        resourcesMap.put(OperationTracker.class, RegistryImpl.this);

        final InjectionResources resources = new MapInjectionResources(resourcesMap);

        final Invokable<T> operation = new Invokable<T>()
        {
            public T invoke()
            {
View Full Code Here

        Map<Class, Object> resources = CollectionFactory.newMap(this.resourcesDefaults);

        resources.put(Object.class, delegate);
        resources.put(serviceInterface, delegate);

        InjectionResources injectionResources = new MapInjectionResources(resources);

        Object result = invoke(injectionResources);

        if (result != null && !serviceInterface.isInstance(result)) { throw new RuntimeException(
                IOCMessages.decoratorReturnedWrongType(method, serviceId, result, serviceInterface)); }
View Full Code Here

    {
        Map<Class, Object> resources = CollectionFactory.newMap(this.resourcesDefaults);

        resources.put(MethodAdviceReceiver.class, methodAdviceReceiver);

        InjectionResources injectionResources = new MapInjectionResources(resources);

        // By design, advise methods return void, so we know that the return value is null.

        invoke(injectionResources);
    }
View Full Code Here

    {
        Map<Class, Object> resources = CollectionFactory.newMap(this.resourcesDefaults);

        resources.put(MethodAdviceReceiver.class, methodAdviceReceiver);

        InjectionResources injectionResources = new MapInjectionResources(resources);

        // By design, advise methods return void, so we know that the return value is null.

        invoke(injectionResources);
    }
View Full Code Here

     * Returns a map (based on injectionResources) that includes (possibly) an additional mapping containing the
     * collected configuration data. This involves scanning the parameters and generic types.
     */
    protected final InjectionResources createInjectionResources()
    {
        InjectionResources core = new MapInjectionResources(injectionResources);

        InjectionResources configurations = new InjectionResources()
        {
            private boolean seenOne;

            @Override
            public <T> T findResource(Class<T> resourceType, Type genericType)
View Full Code Here

                        Map<Class, Object> resourceMap = CollectionFactory.newMap();

                        resourceMap.put(ObjectLocator.class, locator);
                        resourceMap.put(Logger.class, logger);

                        InjectionResources injectionResources = new MapInjectionResources(resourceMap);

                        Throwable fail = null;

                        Object moduleInstance = InternalUtils.isStatic(startupMethod) ? null : moduleBuilderSource.getModuleBuilder();
View Full Code Here

        Map<Class, Object> resources = CollectionFactory.newMap(this.resourcesDefaults);

        resources.put(Object.class, delegate);
        resources.put(serviceInterface, delegate);

        InjectionResources injectionResources = new MapInjectionResources(resources);

        Object result = invoke(injectionResources);

        if (result != null && !serviceInterface.isInstance(result)) { throw new RuntimeException(
                IOCMessages.decoratorReturnedWrongType(method, serviceId, result, serviceInterface)); }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.internal.util.InjectionResources

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.