private void processField ( Field field ) { OptionArgument optAnnotation = field . getAnnotation ( OptionArgument . class ) ; if ( optAnnotation != null ) { processOptionField ( field , optAnnotation . value ( ) , optAnnotation . shortKey ( ) ) ; } else { CommandArgument cmdAnnotation = field . getAnnotation ( CommandArgument . class ) ; if ( cmdAnnotation != null ) { processCommandField ( field , cmdAnnotation . value ( ) , null ) ; } else { ShellArgument shellAnnotation = field . getAnnotation ( ShellArgument . class ) ; if ( shellAnnotation != null ) { processCommandField ( field , shellAnnotation . value ( ) , shellAnnotation . prompt ( ) ) ; } } } }
Processes the relevant annotations on the given field and adds the required options or commands .