Search in sources :

Example 1 with OptionList

use of org.aesh.command.option.OptionList in project wildfly-core by wildfly.

the class HelpSupport method processField.

private static void processField(Set<String> deprecated, Field field) {
    Deprecated dep;
    if ((dep = field.getAnnotation(Deprecated.class)) != null) {
        Option o;
        if ((o = field.getAnnotation(Option.class)) != null) {
            String name = o.name();
            if (name == null || name.isEmpty()) {
                name = field.getName();
            }
            deprecated.add(name);
        } else {
            OptionList ol;
            if ((ol = field.getAnnotation(OptionList.class)) != null) {
                String name = ol.name();
                if (name == null || name.isEmpty()) {
                    name = field.getName();
                }
                deprecated.add(name);
            } else {
                if (field.getAnnotation(Argument.class) != null || field.getAnnotation(Arguments.class) != null) {
                    deprecated.add("");
                }
            }
        }
    }
}
Also used : ProcessedOption(org.aesh.command.impl.internal.ProcessedOption) Option(org.aesh.command.option.Option) OptionList(org.aesh.command.option.OptionList)

Aggregations

ProcessedOption (org.aesh.command.impl.internal.ProcessedOption)1 Option (org.aesh.command.option.Option)1 OptionList (org.aesh.command.option.OptionList)1