private void extractStrategy() {
Annotation[] annotations = this.method.getDeclaredAnnotations();
for(Annotation annotation : annotations) {
if (annotation.annotationType().isAnnotationPresent(DirectReturn.class)){
DirectReturn directReturn = annotation.annotationType().getAnnotation(DirectReturn.class);
Class<? extends ReturnDataStrategy> strategyClass = directReturn.strategy();
try {
this.returnDataStrategy = strategyClass.getConstructor(annotation.annotationType()).newInstance(annotation);
return;
} catch(Exception e) {
throw new DirectException(e);