Browse Source

AnnotatedElementAdapter explicitly declares isAnnotationPresent method

Issue: SPR-14872
pull/1257/head
Juergen Hoeller 9 years ago
parent
commit
17863dfbda
  1. 10
      spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

10
spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

@ -692,6 +692,16 @@ public class TypeDescriptor implements Serializable { @@ -692,6 +692,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) {

Loading…
Cancel
Save