Hello!
I want get File object annotated as Configurable. To do this I wrote this code:
for(Field field : strategy.getClass().getFields()) {
for(Annotation annotation : field.getAnnotations()) {
if(annotation.annotationType().equals(Configurable.class)) {
Configurable conf = ((Configurable) annotation);
if(conf.value().equals(LOG_FILE_KEY)) {
context.getConsole().getOut().println(conf);
}
}
}
}
LOG_FILE_KEY - constant name. If we found it in annotations, logging will be forward to this file. If not - just ignore such feature.
Problem is that Configurable not provide any methods to get access to File itself.