AnnotatedElementAdapter explicitly declares isAnnotationPresent method

Issue: SPR-14872
(cherry picked from commit 17863df)
This commit is contained in:
Juergen Hoeller 2016-11-02 14:41:11 +01:00
parent dc9a8ee933
commit be853d466b
1 changed files with 10 additions and 0 deletions

View File

@ -688,6 +688,16 @@ public class TypeDescriptor implements Serializable {
this.annotations = annotations;
}
@Override
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
for (Annotation annotation : getAnnotations()) {
if (annotation.annotationType() == annotationClass) {
return true;
}
}
return false;
}
@Override
@SuppressWarnings("unchecked")
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {