private static List < String > determinePaths ( final MethodResult methodResult ) { final List < String > paths = new LinkedList <> ( ) ; MethodResult currentMethod = methodResult ; while ( true ) { addNonBlank ( currentMethod . getPath ( ) , paths ) ; final ClassResult parentClass = currentMethod . getParentResource ( ) ; if ( parentClass == null ) break ; currentMethod = parentClass . getParentSubResourceLocator ( ) ; if ( currentMethod == null ) { addNonBlank ( parentClass . getResourcePath ( ) , paths ) ; break ; } } Collections . reverse ( paths ) ; return paths ; }
Determines all single paths of the method result recursively . All parent class and method results are analyzed as well .