use of org.aesh.command.CommandDefinition in project wildfly-core by wildfly.
the class HelpSupport method retrieveDeprecated.
private static void retrieveDeprecated(Set<String> deprecated, Class clazz, List<String> superNames) {
for (Field field : clazz.getDeclaredFields()) {
processField(deprecated, field);
}
if (clazz.getSuperclass() != null) {
Class<?> sup = clazz.getSuperclass();
if (sup.getAnnotation(CommandDefinition.class) != null) {
CommandDefinition cd = (CommandDefinition) sup.getAnnotation(CommandDefinition.class);
superNames.add(cd.name());
}
if (sup.getAnnotation(GroupCommandDefinition.class) != null) {
GroupCommandDefinition gcd = (GroupCommandDefinition) sup.getAnnotation(GroupCommandDefinition.class);
superNames.add(gcd.name());
}
retrieveDeprecated(deprecated, sup, superNames);
}
}
Aggregations