use of io.airlift.airline.Option in project activemq-artemis by apache.
the class OptionsUtil method findAllOptions.
private static void findAllOptions(Set<String> options, Class<? extends Action> command) {
for (Field field : command.getDeclaredFields()) {
if (field.isAnnotationPresent(Option.class)) {
Option annotation = field.getAnnotation(Option.class);
String[] names = annotation.name();
for (String n : names) {
options.add(n);
}
}
}
Class parent = command.getSuperclass();
if (Action.class.isAssignableFrom(parent)) {
findAllOptions(options, parent);
}
}