Examples of AnnotatedType


Examples of javax.enterprise.inject.spi.AnnotatedType

        ConstructorInjectionBean<Object> beanDefinition = constructorInjectionBeanCache.get(beanClass);
        if (beanDefinition == null) {
            synchronized (this) {
                beanDefinition = constructorInjectionBeanCache.get(beanClass);
                if (beanDefinition == null) {
                    final AnnotatedType annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(beanClass);
                    if (isWeb(beanClass)) {
                        beanDefinition = new ConstructorInjectionBean<Object>(webBeansContext, beanClass, annotatedType, false);
                    } else {
                        beanDefinition = new ConstructorInjectionBean<Object>(webBeansContext, beanClass, annotatedType);
                    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        // First get BeanDeploymentArchive for this ejb
        BeanDeploymentArchive bda = weldDeployer.getBeanDeploymentArchiveForBundle(topLevelBundleDesc);
        //BeanDeploymentArchive bda = getBDAForBeanClass(topLevelBundleDesc, managedObject.getClass().getName());
        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(bundle.getApplication());
        BeanManager beanManager = bootstrap.getManager(bda);
        AnnotatedType annotatedType = beanManager.createAnnotatedType(managedObject.getClass());
        InjectionTarget it = beanManager.createInjectionTarget(annotatedType);
        CreationalContext cc = beanManager.createCreationalContext(null);
        it.inject(managedObject, cc);
    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(bundle.getApplication());

        BeanManager beanManager = bootstrap.getManager(bda);

        AnnotatedType annotatedType = beanManager.createAnnotatedType(managedClass);
        if (!invokePostConstruct) {
            annotatedType = new NoPostConstructPreDestroyAnnotatedType(annotatedType);
        }
       
        InjectionTarget it = ((BeanDeploymentArchiveImpl)bda).getInjectionTarget(annotatedType);
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        // First get BeanDeploymentArchive for this ejb
        BeanDeploymentArchive bda = weldDeployer.getBeanDeploymentArchiveForBundle(topLevelBundleDesc);
        //BeanDeploymentArchive bda = getBDAForBeanClass(topLevelBundleDesc, managedObject.getClass().getName());
        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(bundle.getApplication());
        BeanManager beanManager = bootstrap.getManager(bda);
        AnnotatedType annotatedType = beanManager.createAnnotatedType(managedObject.getClass());
        InjectionTarget it = beanManager.createInjectionTarget(annotatedType);
        CreationalContext cc = beanManager.createCreationalContext(null);
        it.inject(managedObject, cc);
    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(bundle.getApplication());

        BeanManager beanManager = bootstrap.getManager(bda);

        AnnotatedType annotatedType = beanManager.createAnnotatedType(managedClass);
        InjectionTarget it = ((BeanDeploymentArchiveImpl)bda).getInjectionTarget(annotatedType);
        if (it == null) {
            it = beanManager.createInjectionTarget(annotatedType);
        }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

  @SuppressWarnings("unchecked")
  public ErraiServiceBean(final BeanManager bm, final String name) {

    //use this to read annotations of the class
    final AnnotatedType at = bm.createAnnotatedType(ErraiServiceImpl.class);

    //use this to create the class and inject dependencies
    this.it = bm.createInjectionTarget(at);
    this.name = name;
  }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        ConstructorInjectionBean<Object> beanDefinition = constructorInjectionBeanCache.get(beanClass);
        if (beanDefinition == null) {
            synchronized (this) {
                beanDefinition = constructorInjectionBeanCache.get(beanClass);
                if (beanDefinition == null) {
                    final AnnotatedType annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(beanClass);
                    if (isWeb(beanClass)) {
                        beanDefinition = new ConstructorInjectionBean<Object>(webBeansContext, beanClass, annotatedType, false);
                    } else {
                        beanDefinition = new ConstructorInjectionBean<Object>(webBeansContext, beanClass, annotatedType);
                    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        @Observes final BeforeBeanDiscovery event, BeanManager beanManager)
    {
        event.addScope(ViewScoped.class, true, true);
        // Register ViewScopeBeanHolder as a bean with CDI annotations, so the system
        // can take it into account, and use it later when necessary.
        AnnotatedType appContext = beanManager.createAnnotatedType(ApplicationContextBean.class);
        event.addAnnotatedType(appContext);
        AnnotatedType bean = beanManager.createAnnotatedType(ViewScopeBeanHolder.class);
        event.addAnnotatedType(bean);
    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

    void beforeBeanDiscovery(
        @Observes final BeforeBeanDiscovery event, BeanManager beanManager)
    {
        // Register FlowBuilderFactoryBean as a bean with CDI annotations, so the system
        // can take it into account, and use it later when necessary.
        AnnotatedType flowDiscoveryHelper = beanManager.createAnnotatedType(FlowBuilderFactoryBean.class);
        event.addAnnotatedType(flowDiscoveryHelper);
    }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedType

        @Observes final BeforeBeanDiscovery event, BeanManager beanManager)
    {
        event.addScope(FlowScoped.class, true, true);
        // Register FlowBuilderFactoryBean as a bean with CDI annotations, so the system
        // can take it into account, and use it later when necessary.
        AnnotatedType bean = beanManager.createAnnotatedType(FlowScopeBeanHolder.class);
        event.addAnnotatedType(bean);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.