Package io.quarkus.arc.processor
Class Annotations
java.lang.Object
io.quarkus.arc.processor.Annotations
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name) static booleancontainsAny(Collection<org.jboss.jandex.AnnotationInstance> annotations, Iterable<org.jboss.jandex.DotName> names) static org.jboss.jandex.AnnotationInstancefind(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name) static Set<org.jboss.jandex.AnnotationInstance>getAnnotations(org.jboss.jandex.AnnotationTarget.Kind kind, Collection<org.jboss.jandex.AnnotationInstance> annotations) static Set<org.jboss.jandex.AnnotationInstance>getAnnotations(org.jboss.jandex.AnnotationTarget.Kind kind, org.jboss.jandex.DotName name, Collection<org.jboss.jandex.AnnotationInstance> annotations) static org.jboss.jandex.AnnotationInstancegetParameterAnnotation(org.jboss.jandex.MethodInfo method, org.jboss.jandex.DotName annotation) Iterates over all annotations on a method and its parameters, filters out all non-parameter annotations and returns a first encounteredAnnotationInstancewith Annotation specified asDotName.static Set<org.jboss.jandex.AnnotationInstance>getParameterAnnotations(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method) static Set<org.jboss.jandex.AnnotationInstance>getParameterAnnotations(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method, int position) static Set<org.jboss.jandex.AnnotationInstance>getParameterAnnotations(Collection<org.jboss.jandex.AnnotationInstance> annotations) static Set<org.jboss.jandex.AnnotationInstance>getParameterAnnotations(Function<org.jboss.jandex.AnnotationTarget, Collection<org.jboss.jandex.AnnotationInstance>> transformedAnnotations, org.jboss.jandex.MethodInfo method, int position) static booleanhasParameterAnnotation(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method, org.jboss.jandex.DotName name) static org.jboss.jandex.AnnotationInstancejandexAnnotation(Annotation annotation) static Collection<org.jboss.jandex.AnnotationInstance>onlyRuntimeVisible(Collection<org.jboss.jandex.AnnotationInstance> annotations)
-
Method Details
-
find
public static org.jboss.jandex.AnnotationInstance find(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name) - Parameters:
annotations-name-- Returns:
- the first matching annotation instance with the given name or null
-
contains
public static boolean contains(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name) - Parameters:
annotations-name-- Returns:
trueif the given collection contains an annotation instance with the given name,falseotherwise
-
containsAny
public static boolean containsAny(Collection<org.jboss.jandex.AnnotationInstance> annotations, Iterable<org.jboss.jandex.DotName> names) - Parameters:
annotations-names-- Returns:
trueif the given collection contains an annotation instance with any of the given names,falseotherwise
-
getParameterAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(Collection<org.jboss.jandex.AnnotationInstance> annotations) - Parameters:
annotations-- Returns:
- the parameter annotations
-
getAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getAnnotations(org.jboss.jandex.AnnotationTarget.Kind kind, Collection<org.jboss.jandex.AnnotationInstance> annotations) - Parameters:
annotations-- Returns:
- the annotations for the given kind
-
getAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getAnnotations(org.jboss.jandex.AnnotationTarget.Kind kind, org.jboss.jandex.DotName name, Collection<org.jboss.jandex.AnnotationInstance> annotations) - Parameters:
annotations-- Returns:
- the annotations for the given kind and name
-
hasParameterAnnotation
public static boolean hasParameterAnnotation(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method, org.jboss.jandex.DotName name) - Parameters:
beanDeployment-method-name-- Returns:
- whether given method has a parameter that has an annotation with given name
-
getParameterAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method) - Parameters:
beanDeployment-method-- Returns:
- collection of annotations present on all parameters of given method
-
getParameterAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method, int position) - Parameters:
beanDeployment-method-position-- Returns:
- the parameter annotations for the given position
-
getParameterAnnotations
public static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(Function<org.jboss.jandex.AnnotationTarget, Collection<org.jboss.jandex.AnnotationInstance>> transformedAnnotations, org.jboss.jandex.MethodInfo method, int position) - Parameters:
transformedAnnotations-method-position-- Returns:
- the parameter annotations for the given position
-
getParameterAnnotation
public static org.jboss.jandex.AnnotationInstance getParameterAnnotation(org.jboss.jandex.MethodInfo method, org.jboss.jandex.DotName annotation) Iterates over all annotations on a method and its parameters, filters out all non-parameter annotations and returns a first encounteredAnnotationInstancewith Annotation specified asDotName. Returnsnullif no such annotation exists.- Parameters:
method- MethodInfo to be searched for annotationsannotation- Annotation we are looking for, represented as DotName- Returns:
- First encountered
AnnotationInstancefitting the requirements,nullif none is found
-
onlyRuntimeVisible
public static Collection<org.jboss.jandex.AnnotationInstance> onlyRuntimeVisible(Collection<org.jboss.jandex.AnnotationInstance> annotations) -
jandexAnnotation
-