Let's say I have this situation:
public String method(String s) {
return stringForThisVisibility(s, EnumVisibility.PUBLIC);
}
and I want to replace it with annotation as follows:
@VisibilityLevel(value = EnumVisibility.PUBLIC)
public String method(String s) {
return stringForThisVisibility(s);
}
This seems to be a better and clearer solution, but I need the stringForThisVisibility method to know the @VisibilityLevel value with some reflection. Is it possible? Can I view annotations of a method that calls stringForThisVisibility?
Fabio source
share