public class Annotations extends Object implements Iterable<Annotation>
AnnotatedElement
.Modifier and Type | Method and Description |
---|---|
static Annotations |
annotations(AnnotatedElement annotatedElement) |
boolean |
contains(Class<? extends Annotation> type) |
boolean |
containsName(String name) |
<T extends Annotation> |
get(Class<T> type) |
Map<Class<? extends Annotation>,Annotation> |
getAnnotations() |
Iterator<Annotation> |
iterator() |
Stream<Annotation> |
stream() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static Annotations annotations(AnnotatedElement annotatedElement)
annotatedElement
- must not be null
public boolean contains(Class<? extends Annotation> type)
type
- must not be null
.public boolean containsName(String name)
name
- must not be null
.public <T extends Annotation> T get(Class<T> type)
type
- must not be null
.null
.public Stream<Annotation> stream()
null
.@Nonnull public Iterator<Annotation> iterator()
iterator
in interface Iterable<Annotation>
public Map<Class<? extends Annotation>,Annotation> getAnnotations()
Copyright © 2024. All rights reserved.