Package org.apache.webbeans.portable.events

Examples of org.apache.webbeans.portable.events.ExtensionLoader



    }

    private void loadExtensions(AppContext appContext) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
        final ExtensionLoader extensionLoader = webBeansContext.getExtensionLoader();

        // Load regularly visible Extensions
        extensionLoader.loadExtensionServices(appContext.getClassLoader());

        // Load any potentially misplaced extensions -- TCK seems to be full of them
        // This could perhaps be improved or addressed elsewhere
//        final String s = "WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension";
//        final ArrayList<URL> list = Collections.list(appContext.getClassLoader().getResources(s));
View Full Code Here



    }

    private void loadExtensions(AppContext appContext) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
        final ExtensionLoader extensionLoader = webBeansContext.getExtensionLoader();

        // Load regularly visible Extensions
        extensionLoader.loadExtensionServices(appContext.getClassLoader());

        // Load any potentially misplaced extensions -- TCK seems to be full of them
        // This could perhaps be improved or addressed elsewhere
//        final String s = "WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension";
//        final ArrayList<URL> list = Collections.list(appContext.getClassLoader().getResources(s));
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected T createComponentInstance(CreationalContext<T> creationalContext)
    {
        ExtensionLoader loader = ExtensionLoader.getInstance();
       
        return loader.getBeanInstance(this);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected T createComponentInstance(CreationalContext<T> creationalContext)
    {
        ExtensionLoader loader = ExtensionLoader.getInstance();
       
        return loader.getBeanInstance(this);
    }
View Full Code Here


    }

    private void loadExtensions(AppContext appContext) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
        final ExtensionLoader extensionLoader = webBeansContext.getExtensionLoader();

        // Load regularly visible Extensions
        extensionLoader.loadExtensionServices(appContext.getClassLoader());

        // Load any potentially misplaced extensions -- TCK seems to be full of them
        // This could perhaps be improved or addressed elsewhere
//        final String s = "WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension";
//        final ArrayList<URL> list = Collections.list(appContext.getClassLoader().getResources(s));
View Full Code Here

    }

    @Override
    public R produce(CreationalContext<R> creationalContext)
    {
        ExtensionLoader loader = webBeansContext.getExtensionLoader();
       
        return loader.getBeanInstance((Bean<R>)((CreationalContextImpl<R>) creationalContext).getBean());
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected T createComponentInstance(CreationalContext<T> creationalContext)
    {
        ExtensionLoader loader = getWebBeansContext().getExtensionLoader();
       
        return loader.getBeanInstance(this);
    }
View Full Code Here

    }

    @Override
    protected R produce(Map<Interceptor<?>, ?> interceptors, CreationalContextImpl<R> creationalContext)
    {
        ExtensionLoader loader = webBeansContext.getExtensionLoader();
       
        return (R) loader.getExtension(creationalContext.getBean().getBeanClass());
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected T createComponentInstance(CreationalContext<T> creationalContext)
    {
        ExtensionLoader loader = ExtensionLoader.getInstance();
       
        return loader.getBeanInstance(this);
    }
View Full Code Here

        }
    }

    private void saveCDIExtension(final Bundle bundle, final AppContext appContext) {
        final WebBeansContext context = appContext.getWebBeansContext();
        final ExtensionLoader extensionLoader = context.getExtensionLoader();
        final Set<Class<? extends Extension>> extensions = (Set<Class<? extends Extension>>) Reflections.get(extensionLoader, "extensionClasses");
        final Set<String> names = new HashSet<String>();
        for (Class<?> extension : extensions) {
            names.add(extension.getName());
        }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.portable.events.ExtensionLoader

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.