The container fires an event of this type for each Java class or interface added by
BeforeBeanDiscovery#addAnnotatedType(AnnotatedType),
BeforeBeanDiscovery#addAnnotatedType(AnnotatedType, String) or
javax.enterprise.inject.spi.AfterTypeDiscovery#addAnnotatedType(AnnotatedType, String)
Any observer of this event is permitted to wrap and/or replace the javax.enterprise.inject.spi.AnnotatedType. The
container must use the final value of this property, after all observers have been called, to discover the types and read the
annotations of the program elements.
For example, the following observer decorates the javax.enterprise.inject.spi.AnnotatedType for every class that is
added by BeforeBeanDiscovery#addAnnotatedType(AnnotatedType).
public <T> void decorateAnnotatedType(@Observes ProcessSyntheticAnnotatedType<T> pat) {
pat.setAnnotatedType(decorate(pat.getAnnotatedType()));
}
If any observer method of a ProcessSyntheticAnnotatedType event throws an exception, the exception is treated as a
definition error by the container.
AnnotatedType, ProcessAnnotatedType
| Modifier and Type | Method and Description |
|---|---|
| public Extension | Returns: the extension instanceGet the extension instance which added the |
| getSource | back to summary |
|---|---|
| public Extension getSource() Get the extension instance which added the
| |