Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AnnotationClassLocator |
|
| 0.0;0 |
1 | package nl.beesting.beangenerator.locators; | |
2 | ||
3 | import nl.beesting.beangenerator.util.DataConfiguration; | |
4 | import org.aopalliance.intercept.MethodInvocation; | |
5 | ||
6 | /** | |
7 | * ClassLocator that makes use of the annotaions. | |
8 | * @author Erik Jan de Wit | |
9 | */ | |
10 | 2 | public class AnnotationClassLocator implements ClassLocator { |
11 | ||
12 | public Class<?> findClass(MethodInvocation invocation) { | |
13 | 1 | DataConfiguration configuration = invocation.getMethod().getAnnotation(DataConfiguration.class); |
14 | 1 | return configuration.returnType(); |
15 | } | |
16 | ||
17 | } |