Class BeanManagerProxy

    • Constructor Detail

    • Method Detail

      • getBeans

        public Set<Bean<?>> getBeans​(Type beanType,
                                     Annotation... qualifiers)
        Description copied from interface: BeanManager
        Return the set of beans which have the given required type and qualifiers and are available for injection in the module or library containing the class into which the BeanManager was injected or the Jakarta EE component from whose JNDI environment namespace the BeanManager was obtained, according to the rules of typesafe resolution. If no qualifiers are given, the default qualifier is assumed.
        Note that when called during invocation of an AfterBeanDiscovery event observer, this method will only return beans discovered by the container before the AfterBeanDiscovery event is fired.
        Specified by:
        getBeans in interface BeanManager
        Overrides:
        getBeans in class ForwardingBeanManager
        Parameters:
        beanType - the required bean type
        qualifiers - the required qualifiers
        Returns:
        the resulting set of beans
      • getBeans

        public Set<Bean<?>> getBeans​(String name)
        Description copied from interface: BeanManager
        Return the set of beans which have the given EL name and are available for injection in the module or library containing the class into which the BeanManager was injected or the Jakarta EE component from whose JNDI environment namespace the BeanManager was obtained, according to the rules of EL name resolution.
        Note that when called during invocation of an AfterBeanDiscovery event observer, this method will only return beans discovered by the container before the AfterBeanDiscovery event is fired.
        Specified by:
        getBeans in interface BeanManager
        Overrides:
        getBeans in class ForwardingBeanManager
        Parameters:
        name - the EL name
        Returns:
        the resulting set of beans
      • resolve

        public <X> Bean<? extends X> resolve​(Set<Bean<? extends X>> beans)
        Description copied from interface: BeanManager
        Apply the ambiguous dependency resolution rules to a set of beans.
        Note that when called during invocation of an AfterBeanDiscovery event observer, this method will only return beans discovered by the container before the AfterBeanDiscovery event is fired.
        Specified by:
        resolve in interface BeanManager
        Overrides:
        resolve in class ForwardingBeanManager
        Type Parameters:
        X - a common type of the beans
        Parameters:
        beans - a set of beans of the given type
        Returns:
        the resolved bean, or null if null or an empty set is passed
      • resolveDecorators

        public List<Decorator<?>> resolveDecorators​(Set<Type> types,
                                                    Annotation... qualifiers)
        Description copied from interface: BeanManager
        Return an ordered list of decorators for a set of bean types and a set of qualifiers and which are enabled in the module or library containing the class into which the BeanManager was injected or the Jakarta EE component from whose JNDI environment namespace the BeanManager was obtained.
        Note that when called during invocation of an AfterBeanDiscovery event observer, this method will only return decorators discovered by the container before the AfterBeanDiscovery event is fired.
        Specified by:
        resolveDecorators in interface BeanManager
        Overrides:
        resolveDecorators in class ForwardingBeanManager
        Parameters:
        types - the set of bean types of the decorated bean
        qualifiers - the qualifiers declared by the decorated bean
        Returns:
        the resulting set of decorators
      • resolveInterceptors

        public List<Interceptor<?>> resolveInterceptors​(InterceptionType type,
                                                        Annotation... interceptorBindings)
        Description copied from interface: BeanManager
        Return an ordered list of enabled interceptors for a set of interceptor bindings and a type of interception and which are enabled in the module or library containing the class into which the BeanManager was injected or the Jakarta EE component from whose JNDI environment namespace the BeanManager was obtained.
        Note that when called during invocation of an AfterBeanDiscovery event observer, this method will only return interceptors discovered by the container before the AfterBeanDiscovery event is fired.
        Specified by:
        resolveInterceptors in interface BeanManager
        Overrides:
        resolveInterceptors in class ForwardingBeanManager
        Parameters:
        type - the type of the interception
        interceptorBindings - the interceptor bindings
        Returns:
        the resulting set of interceptors
      • createInjectionTarget

        public <T> InjectionTarget<T> createInjectionTarget​(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
        Specified by:
        createInjectionTarget in interface org.jboss.weld.manager.api.WeldManager
      • getBean

        public <T> Bean<T> getBean​(org.jboss.weld.ejb.spi.EjbDescriptor<T> descriptor)
        Specified by:
        getBean in interface org.jboss.weld.manager.api.WeldManager
      • getEjbDescriptor

        public <T> org.jboss.weld.ejb.spi.EjbDescriptor<T> getEjbDescriptor​(String ejbName)
        Specified by:
        getEjbDescriptor in interface org.jboss.weld.manager.api.WeldManager
      • getServices

        public org.jboss.weld.bootstrap.api.ServiceRegistry getServices()
        Specified by:
        getServices in interface org.jboss.weld.manager.api.WeldManager
      • fireProcessInjectionTarget

        public <X> InjectionTarget<X> fireProcessInjectionTarget​(AnnotatedType<X> type)
        Specified by:
        fireProcessInjectionTarget in interface org.jboss.weld.manager.api.WeldManager
      • fireProcessInjectionTarget

        public <X> InjectionTarget<X> fireProcessInjectionTarget​(AnnotatedType<X> annotatedType,
                                                                 InjectionTarget<X> injectionTarget)
        Specified by:
        fireProcessInjectionTarget in interface org.jboss.weld.manager.api.WeldManager
      • getId

        public String getId()
        Specified by:
        getId in interface org.jboss.weld.manager.api.WeldManager
      • instance

        public Instance<Object> instance()
        Specified by:
        instance in interface org.jboss.weld.manager.api.WeldManager
      • createInstance

        public WeldInstance<Object> createInstance()
        Description copied from interface: BeanManager
        Obtains an Instance object to access to beans instances. The returned Instance object can only access instances of beans that are available for injection in the module or library containing the class into which the BeanManager was injected or the Jakarta EE component from whose JNDI environment namespace the BeanManager was obtained, according to the rules of typesafe resolution. Note that when called during invocation of an AfterBeanDiscovery event observer, the Instance returned by this method will only give access to instances of beans discovered by the container before the AfterBeanDiscovery event is fired. Instances of dependent scoped beans obtained with this Instance must be explicitly destroyed by calling Instance.destroy(Object) If no qualifier is passed to Instance.select(java.lang.annotation.Annotation...) method, the @Default qualifier is assumed.
        Specified by:
        createInstance in interface BeanManager
        Overrides:
        createInstance in class ForwardingBeanManager
        Returns:
        an Instance object to request beans instances
      • getPassivationCapableBean

        public Bean<?> getPassivationCapableBean​(org.jboss.weld.serialization.spi.BeanIdentifier identifier)
        Specified by:
        getPassivationCapableBean in interface org.jboss.weld.manager.api.WeldManager
      • createInjectionTargetBuilder

        public <T> org.jboss.weld.manager.api.WeldInjectionTargetBuilder<T> createInjectionTargetBuilder​(AnnotatedType<T> type)
        Specified by:
        createInjectionTargetBuilder in interface org.jboss.weld.manager.api.WeldManager
      • unwrap

        public BeanManagerImpl unwrap()
        Specified by:
        unwrap in interface org.jboss.weld.manager.api.WeldManager
      • createAnnotatedType

        public <T> AnnotatedType<T> createAnnotatedType​(Class<T> type,
                                                        String id)
        Specified by:
        createAnnotatedType in interface org.jboss.weld.manager.api.WeldManager
      • disposeAnnotatedType

        public <T> void disposeAnnotatedType​(Class<T> type,
                                             String id)
        Specified by:
        disposeAnnotatedType in interface org.jboss.weld.manager.api.WeldManager
      • isContextActive

        public boolean isContextActive​(Class<? extends Annotation> scopeType)
        Specified by:
        isContextActive in interface org.jboss.weld.manager.api.WeldManager
      • getScopes

        public Collection<Class<? extends Annotation>> getScopes()
        Specified by:
        getScopes in interface org.jboss.weld.manager.api.WeldManager