Package io.quarkus.arc.processor
Interface ObserverTransformer.TransformationContext
- All Superinterfaces:
BuildExtension.BuildContext
- Enclosing interface:
- ObserverTransformer
public static interface ObserverTransformer.TransformationContext
extends BuildExtension.BuildContext
Transformation context.
-
Method Summary
Modifier and TypeMethodDescriptionCollection<org.jboss.jandex.AnnotationInstance>Retrieves all annotations declared on the observer method.org.jboss.jandex.MethodInfoorg.jboss.jandex.TypeSet<org.jboss.jandex.AnnotationInstance>jakarta.enterprise.event.Receptionjakarta.enterprise.event.TransactionPhasebooleanisAsync()The transformation is not applied until theAnnotationsTransformation.done()method is invoked.voidveto()Instruct the container to ignore the observer method.Methods inherited from interface io.quarkus.arc.processor.BuildExtension.BuildContext
get, put
-
Method Details
-
getMethod
org.jboss.jandex.MethodInfo getMethod()- Returns:
- the corresponding observer method or null in case of synthetic observer
-
getObservedType
org.jboss.jandex.Type getObservedType()- Returns:
- the observed type
-
getQualifiers
Set<org.jboss.jandex.AnnotationInstance> getQualifiers()- Returns:
- the set of qualifiers
-
getReception
jakarta.enterprise.event.Reception getReception()- Returns:
- the reception
-
getTransactionPhase
jakarta.enterprise.event.TransactionPhase getTransactionPhase()- Returns:
- the transaction phase
-
isAsync
boolean isAsync()- Returns:
- true if the observer is asynchronous
-
getAllAnnotations
Collection<org.jboss.jandex.AnnotationInstance> getAllAnnotations()Retrieves all annotations declared on the observer method. This method is preferred to manual inspection ofgetMethod()which may, in some corner cases, hold outdated information.The resulting set of annotations contains annotations that belong to the method itself as well as to its parameters.
- Returns:
- collection of all annotations or an empty list in case of synthetic observer
-
veto
void veto()Instruct the container to ignore the observer method. -
transform
ObserverTransformer.ObserverTransformation transform()The transformation is not applied until theAnnotationsTransformation.done()method is invoked.- Returns:
- a new transformation
-