parameters: (source_path: pathlib.Path)
return_statement: return f'{package}.{class_name}'
docstring: Guess the fully qualified class name from the path to the source file.
docstring_summary: Guess the fully qualified class name from the path to the source file.
docstring_tokens: Guess the fully qualified class name from the path to the source file .
function: def _parse_full_java_class(source_path: pathlib.Path) -> str:
          """Guess the fully qualified class name from the path to the source file."""
          if source_path.suffix != '.java':
              logging.warning(f'"{source_path}" does not have the .java suffix')
              return None
  
          directory_path: pathlib.Path = source_path.parent
          package_list_reversed = []
          for part in reversed(directory_path.parts):
              if part == 'java':
                  break
              package_list_reversed.append(part)
              if part in ('com', 'org'):
                  break
          else:
              logging.debug(f'File {source_path} not in a subdir of "org" or "com", '
                            'cannot detect package heuristically.')
              return None
  
          package = '.'.join(reversed(package_list_reversed))
          class_name = source_path.stem
          return f'{package}.{class_name}'
function_tokens: def _parse_full_java_class ( source_path : pathlib . Path ) -> str : if source_path . suffix != '.java' : logging . warning ( f'"{source_path}" does not have the .java suffix' ) return None directory_path : pathlib . Path = source_path . parent package_list_reversed = [ ] for part in reversed ( directory_path . parts ) : if part == 'java' : break package_list_reversed . append ( part ) if part in ( 'com' , 'org' ) : break else : logging . debug ( f'File {source_path} not in a subdir of "org" or "com", ' 'cannot detect package heuristically.' ) return None package = '.' . join ( reversed ( package_list_reversed ) ) class_name = source_path . stem return f'{package}.{class_name}'