-
public interface BeforeBeanDiscovery
This event type is thrown by the container before the bean discovery process begins. If any observer method of the
BeforeBeanDiscovery
event throws an exception, the exception is treated as a definition error by the container.- Author:
- Pete Muir, David Allen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addAnnotatedType(AnnotatedType<?> type)
Adds a givenAnnotatedType
to the set of types which will be scanned during bean discovery.void
addAnnotatedType(AnnotatedType<?> type, String id)
Adds a givenAnnotatedType
to the set of types which will be scanned during bean discovery.void
addInterceptorBinding(AnnotatedType<? extends Annotation> bindingType)
Declares an annotation type as an interceptor binding type.void
addInterceptorBinding(Class<? extends Annotation> bindingType, Annotation... bindingTypeDef)
Declares an annotation type as an interceptor binding type, and specifies its meta-annotations.void
addQualifier(AnnotatedType<? extends Annotation> qualifier)
Declares an annotation type as a Qualifier qualifier type.void
addQualifier(Class<? extends Annotation> qualifier)
Declares an annotation type as a Qualifier qualifier type.void
addScope(Class<? extends Annotation> scopeType, boolean normal, boolean passivating)
Declares an annotation type as a scope type.void
addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef)
Declares an annotation type as a stereotype, and specifies its meta-annotations.
-
-
-
Method Detail
-
addQualifier
void addQualifier(Class<? extends Annotation> qualifier)
Declares an annotation type as a Qualifier qualifier type.
This is only required if you wish to make an annotation a qualifier without adding
Qualifier
to it.- Parameters:
qualifier
- The annotation to treat as a qualifier
-
addQualifier
void addQualifier(AnnotatedType<? extends Annotation> qualifier)
Declares an annotation type as a Qualifier qualifier type.
This is only required if you wish to make an annotation a qualifier without adding
Qualifier
to it.- Parameters:
qualifier
- The annotation to treat as a qualifier- Since:
- 1.1
-
addScope
void addScope(Class<? extends Annotation> scopeType, boolean normal, boolean passivating)
Declares an annotation type as a scope type.
This is only required if you wish to make an annotation a scope type without adding the
NormalScope
orScope
annotations to it. You can also use this method to override an existing normal scope definition.- Parameters:
scopeType
- The annotation type to treat as a scope typenormal
- Indicates if the scope is normalpassivating
- Indicates if the scope is passivation capable- See Also:
AfterBeanDiscovery.addContext(javax.enterprise.context.spi.Context)
-
addStereotype
void addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef)
Declares an annotation type as a stereotype, and specifies its meta-annotations.
This is only required if you wish to make an annotation a stereotype without adding
Stereotype
to it. You can also use this method to override an existing stereotype definition.- Parameters:
stereotype
- The annotation type to treat as a stereotypestereotypeDef
- An optional list of annotations defining the stereotype
-
addInterceptorBinding
void addInterceptorBinding(AnnotatedType<? extends Annotation> bindingType)
Declares an annotation type as an interceptor binding type.
This is only required if you wish to make an annotation an interceptor binding type without adding
InterceptorBinding
to it.- Parameters:
bindingType
- The annotation type to treat as an interceptor binding type
-
addInterceptorBinding
void addInterceptorBinding(Class<? extends Annotation> bindingType, Annotation... bindingTypeDef)
Declares an annotation type as an interceptor binding type, and specifies its meta-annotations.
This is only required if you wish to make an annotation an interceptor binding type without adding
InterceptorBinding
to it.- Parameters:
bindingType
- The annotation type to treat as an interceptor binding typebindingTypeDef
- An optional list of annotations defining the interceptor- Since:
- 1.1
-
addAnnotatedType
void addAnnotatedType(AnnotatedType<?> type)
Adds a given
AnnotatedType
to the set of types which will be scanned during bean discovery.This method is deprecated from CDI 1.1 and
addAnnotatedType(AnnotatedType, String)
should be used instead.- Parameters:
type
- TheAnnotatedType
to add for later scanning
-
addAnnotatedType
void addAnnotatedType(AnnotatedType<?> type, String id)
Adds a given
AnnotatedType
to the set of types which will be scanned during bean discovery.This method allows multiple annotated types, based on the same underlying type, to be defined.
AnnotatedType
s discovered by the container use the fully qualified class name ofAnnotatedType.getJavaClass()
to identify the type.AfterBeanDiscovery.getAnnotatedType(Class, String)
andAfterBeanDiscovery.getAnnotatedTypes(Class)
allows annotated types to be obtained by identifier.- Parameters:
type
- TheAnnotatedType
to add for later scanningid
- The id of the annotated type- 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/beforebeandiscovery.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
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.