Package javax.enterprise.inject.spi

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


        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

        BeanManager beanManager = getBeanManager();

        CreationalContext creationalContext = beanManager.createCreationalContext(null);

        AnnotatedType annotatedType = beanManager.createAnnotatedType(instance.getClass());
        InjectionTarget injectionTarget = beanManager.createInjectionTarget(annotatedType);
        injectionTarget.inject(instance, creationalContext);
        return instance;
    }
View Full Code Here

        WeldContainer wc = getWeldContainer();
        if (wc != null) {
            BeanManager beanManager = wc.getBeanManager();

            AnnotatedType annotatedType = beanManager.createAnnotatedType(managedClass);
            InjectionTarget target = beanManager.createInjectionTarget(annotatedType);

            CreationalContext cc = beanManager.createCreationalContext(null);

            target.inject(managedObject, cc);
View Full Code Here

        WeldContainer wc = getWeldContainer();

        if (wc != null) {
            BeanManager beanManager = wc.getBeanManager();

            AnnotatedType annotatedType = beanManager.createAnnotatedType(managedObject.getClass());
            InjectionTarget target = beanManager.createInjectionTarget(annotatedType);

            CreationalContext cc = beanManager.createCreationalContext(null);

            target.inject(managedObject, cc);
View Full Code Here

  @SuppressWarnings("unchecked")
  public ErraiServiceBean(BeanManager bm, ErraiService delegate) {

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

    //use this to create the class and inject dependencies
    this.it = bm.createInjectionTarget(at);

    // invocation target
View Full Code Here

  @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

  static final Set<Type> types = unmodifiableSet(new HashSet<Type>(asList(RequestDispatcher.class, Object.class)));

  public RequestDispatcherMetaData(final BeanManager bm, final RequestDispatcher delegate) {

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

    //use this to create the class and inject dependencies
    this.it = bm.createInjectionTarget(at);

    // invocation target
View Full Code Here

  final RequestDispatcher delegate;

  public RequestDispatcherMetaData(BeanManager bm, RequestDispatcher delegate) {

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

    //use this to create the class and inject dependencies
    this.it = bm.createInjectionTarget(at);

    // invocation target
View Full Code Here

  @SuppressWarnings("unchecked")
  public ErraiServiceBean(BeanManager bm) {

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

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

TOP

Related Classes of javax.enterprise.inject.spi.AnnotatedType

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.