javax.enterprise.inject.spi

Interface AfterBeanDiscovery


  • public interface AfterBeanDiscovery

    The event type of the second event fired by the container when it has fully completed the bean discovery process, validated that there are no definition errors relating to the discovered beans, and registered Bean and ObserverMethod objects for the discovered beans, but before detecting deployment problems.

    A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.

         void afterBeanDiscovery(@Observes AfterBeanDiscovery event, BeanManager manager) { ... }
     

    If any observer method of the AfterBeanDiscovery event throws an exception, the exception is treated as a definition error by the container.

    Author:
    David Allen
    • Method Detail

      • addDefinitionError

        void addDefinitionError(Throwable t)
        Registers a definition error with the container, causing the container to abort deployment after all observers have been notified.
        Parameters:
        t - The definition error as a Throwable
      • addBean

        void addBean(Bean<?> bean)
        Fires an event of type ProcessBean containing the given Bean and then registers the Bean with the container, thereby making it available for injection into other beans. The given Bean may implement Interceptor or Decorator.
        Parameters:
        bean - The bean to add to the deployment
      • addObserverMethod

        void addObserverMethod(ObserverMethod<?> observerMethod)
        Fires an event of type ProcessObserverMethod containing the given ObserverMethod and then registers the ObserverMethod with the container, thereby making it available for event notifications.
        Parameters:
        observerMethod - The custom observer method to add to the deployment
      • addContext

        void addContext(Context context)
        Registers a custom Context object with the container.
        Parameters:
        context - The custom context to add to the deployment
      • getAnnotatedType

        <T> AnnotatedType<T> getAnnotatedType(Class<T> type,
                                              String id)
        Obtain the AnnotatedType that may be used to read the annotations of the given class or interface as defined during container initialization.
        Type Parameters:
        T - the class or interface
        Parameters:
        type - the Class object
        id - the type identifier. If null, the fully qualifier class name of type is used
        Returns:
        the AnnotatedType
        Since:
        1.1
      • getAnnotatedTypes

        <T> Iterable<AnnotatedType<T>> getAnnotatedTypes(Class<T> type)
        Obtain the AnnotatedTypes that may be used to read the annotations of the given class or interface as defined during container initialization.
        Type Parameters:
        T - the class or interface
        Parameters:
        type - the Class object
        Returns:
        the AnnotatedTypes
        Since:
        1.1

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/enterprise/inject/spi/afterbeandiscovery.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.