1 | |
package com.lexicalscope.fluentreflection; |
2 | |
|
3 | |
import java.lang.annotation.Annotation; |
4 | |
import java.lang.reflect.AnnotatedElement; |
5 | |
|
6 | |
import org.hamcrest.Matcher; |
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
abstract class AbstractFluentAnnotated implements FluentAnnotated { |
25 | |
private final FluentAnnotated annotatedElement; |
26 | |
|
27 | 9786 | public AbstractFluentAnnotated( |
28 | |
final ReflectedTypeFactory reflectedTypeFactory, |
29 | |
final AnnotatedElement annotatedElement) { |
30 | 9786 | this.annotatedElement = new FluentAnnotatedImpl(reflectedTypeFactory, annotatedElement); |
31 | 9786 | } |
32 | |
|
33 | |
@Override public FluentClass<?> annotation(final Matcher<? super FluentClass<?>> annotationMatcher) { |
34 | 176 | return annotatedElement.annotation(annotationMatcher); |
35 | |
} |
36 | |
|
37 | |
@Override public boolean annotatedWith(final Class<? extends Annotation> annotationClass) { |
38 | 32 | return annotatedElement.annotatedWith(annotationClass); |
39 | |
} |
40 | |
|
41 | |
@Override public boolean annotatedWith(final Matcher<? super FluentClass<?>> annotationMatcher) { |
42 | 0 | return annotatedElement.annotatedWith(annotationMatcher); |
43 | |
} |
44 | |
|
45 | |
@Override public <A extends Annotation> A annotation(final Class<A> annotationClass) { |
46 | 16 | return annotatedElement.annotation(annotationClass); |
47 | |
} |
48 | |
} |