equal
deleted
inserted
replaced
231 * {@inheritDoc} |
231 * {@inheritDoc} |
232 * @throws NullPointerException {@inheritDoc} |
232 * @throws NullPointerException {@inheritDoc} |
233 */ |
233 */ |
234 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { |
234 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { |
235 Objects.requireNonNull(annotationClass); |
235 Objects.requireNonNull(annotationClass); |
236 |
236 return annotationClass.cast(declaredAnnotations().get(annotationClass)); |
237 return AnnotationSupport.getOneAnnotation(declaredAnnotations(), annotationClass); |
|
238 } |
237 } |
239 |
238 |
240 /** |
239 /** |
241 * {@inheritDoc} |
240 * {@inheritDoc} |
242 * @throws NullPointerException {@inheritDoc} |
241 * @throws NullPointerException {@inheritDoc} |