protected List < MethodHelpDto > describeMethods ( ) { List < MethodHelpDto > result = new LinkedList <> ( ) ; Path endpointPath = getClass ( ) . getAnnotation ( Path . class ) ; for ( Method method : getClass ( ) . getDeclaredMethods ( ) ) { String parentPath = endpointPath == null ? null : endpointPath . value ( ) ; MethodHelpDto methodHelpDto = MethodHelpDto . fromMethodClass ( parentPath , method ) ; if ( methodHelpDto != null ) { result . add ( methodHelpDto ) ; } } Collections . sort ( result ) ; return result ; }
Generates help DTOs for each method on the service interface . The root context shall return a null list . All other endpoints will re - use this implementation .