void visit(final int index, @NotNull final Class<?> type, @NotNull final Annotation[] annotations);
}
public static <T> T visitQuery(@NotNull final Method method, @NotNull final QueryVisitor<T> visitor) {
final Finder finder = AnnotationUtils.findAnnotation(method, Finder.class);
if (StringUtils.hasText(finder.query())) {
return visitor.visitQuery(finder.query());
} else if (StringUtils.hasText(finder.sqlQuery())) {
return visitor.visitSQLQuery(finder.sqlQuery());
} else if (StringUtils.hasText(finder.sqlQueryName())) {
return visitor.visitSQLNamedQuery(finder.sqlQueryName());