public final class Annotations extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(Collection<org.jboss.jandex.AnnotationInstance> annotations,
org.jboss.jandex.DotName name) |
static boolean |
containsAny(Collection<org.jboss.jandex.AnnotationInstance> annotations,
Iterable<org.jboss.jandex.DotName> names) |
static org.jboss.jandex.AnnotationInstance |
find(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.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 encountered
AnnotationInstance with Annotation specified as DotName. |
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) |
public static org.jboss.jandex.AnnotationInstance find(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name)
annotations - name - public static boolean contains(Collection<org.jboss.jandex.AnnotationInstance> annotations, org.jboss.jandex.DotName name)
annotations - name - true if the given collection contains an annotation instance with the given name, false otherwisepublic static boolean containsAny(Collection<org.jboss.jandex.AnnotationInstance> annotations, Iterable<org.jboss.jandex.DotName> names)
annotations - names - true if the given collection contains an annotation instance with any of the given names, false
otherwisepublic static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(Collection<org.jboss.jandex.AnnotationInstance> annotations)
annotations - public static Set<org.jboss.jandex.AnnotationInstance> getAnnotations(org.jboss.jandex.AnnotationTarget.Kind kind, Collection<org.jboss.jandex.AnnotationInstance> annotations)
annotations - 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)
annotations - public static Set<org.jboss.jandex.AnnotationInstance> getParameterAnnotations(BeanDeployment beanDeployment, org.jboss.jandex.MethodInfo method, int position)
beanDeployment - method - position - 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)
transformedAnnotations - method - position - public static org.jboss.jandex.AnnotationInstance getParameterAnnotation(org.jboss.jandex.MethodInfo method,
org.jboss.jandex.DotName annotation)
AnnotationInstance with Annotation specified as DotName.
Returns null if no such annotation exists.method - MethodInfo to be searched for annotationsannotation - Annotation we are looking for, represented as DotNameAnnotationInstance fitting the requirements, null if none is foundCopyright © 2021 JBoss by Red Hat. All rights reserved.