private void findParamDescMethods ( ) { for ( Method method : m_commandClass . getMethods ( ) ) { if ( method . isAnnotationPresent ( ParamDescription . class ) ) { try { RESTParameter cmdParam = ( RESTParameter ) method . invoke ( null , ( Object [ ] ) null ) ; addParameter ( cmdParam ) ; } catch ( Exception e ) { LOGGER . warn ( "Method '{}' for class '{}' could not be invoked: {}" , new Object [ ] { method . getName ( ) , m_commandClass . getName ( ) , e . toString ( ) } ) ; } } } }
Look for ParamDescription annotations and attempt to call each annotated method .