tools/android/modularization/convenience/lookup_dep.py
def _compute_full_class_names_for_build_config(self,
                                                 deps_info: Dict) -> Set[str]:
    """Returns set of fully qualified class names for build config."""

    full_class_names = set()

    # Read the location of the java_sources_file from the build_config
    sources_path = deps_info.get('java_sources_file')
    if sources_path:
      # Read the java_sources_file, indexing the classes found
      with open(self._abs_build_output_dir / sources_path) as sources_contents:
        for source_line in sources_contents:
          source_path = pathlib.Path(source_line.strip())
          java_class = self._parse_full_java_class(source_path)
          if java_class:
            full_class_names.add(java_class)

    # |unprocessed_jar_path| is set for prebuilt targets. (ex:
    # android_aar_prebuilt())
    # |unprocessed_jar_path| might be set but not exist if not all targets have
    # been built.
    unprocessed_jar_path = deps_info.get('unprocessed_jar_path')
    if unprocessed_jar_path:
      abs_unprocessed_jar_path = (self._abs_build_output_dir /
                                  unprocessed_jar_path)
      if abs_unprocessed_jar_path.exists():
        # Normalize path but do not follow symlink if .jar is symlink.
        abs_unprocessed_jar_path = (abs_unprocessed_jar_path.parent.resolve() /
                                    abs_unprocessed_jar_path.name)

        full_class_names.update(
            self._extract_full_class_names_from_jar(self._abs_build_output_dir,
                                                    abs_unprocessed_jar_path))

    return full_class_names
Returns set of fully qualified class names for build config.
Returns set of fully qualified class names for build config.
Returns set of fully qualified class names for build config .
def _compute_full_class_names_for_build_config(self,
                                                 deps_info: Dict) -> Set[str]:
    full_class_names = set()
    sources_path = deps_info.get('java_sources_file')
    if sources_path:
      with open(self._abs_build_output_dir / sources_path) as sources_contents:
        for source_line in sources_contents:
          source_path = pathlib.Path(source_line.strip())
          java_class = self._parse_full_java_class(source_path)
          if java_class:
            full_class_names.add(java_class)
    unprocessed_jar_path = deps_info.get('unprocessed_jar_path')
    if unprocessed_jar_path:
      abs_unprocessed_jar_path = (self._abs_build_output_dir /
                                  unprocessed_jar_path)
      if abs_unprocessed_jar_path.exists():
        abs_unprocessed_jar_path = (abs_unprocessed_jar_path.parent.resolve() /
                                    abs_unprocessed_jar_path.name)
        full_class_names.update(
            self._extract_full_class_names_from_jar(self._abs_build_output_dir,
                                                    abs_unprocessed_jar_path))
    return full_class_names
def _compute_full_class_names_for_build_config ( self , deps_info : Dict ) -> Set [ str ] : full_class_names = set ( ) sources_path = deps_info . get ( 'java_sources_file' ) if sources_path : with open ( self . _abs_build_output_dir / sources_path ) as sources_contents : for source_line in sources_contents : source_path = pathlib . Path ( source_line . strip ( ) ) java_class = self . _parse_full_java_class ( source_path ) if java_class : full_class_names . add ( java_class ) unprocessed_jar_path = deps_info . get ( 'unprocessed_jar_path' ) if unprocessed_jar_path : abs_unprocessed_jar_path = ( self . _abs_build_output_dir / unprocessed_jar_path ) if abs_unprocessed_jar_path . exists ( ) : abs_unprocessed_jar_path = ( abs_unprocessed_jar_path . parent . resolve ( ) / abs_unprocessed_jar_path . name ) full_class_names . update ( self . _extract_full_class_names_from_jar ( self . _abs_build_output_dir , abs_unprocessed_jar_path ) ) return full_class_names
Returns set of fully qualified class names for build config.
Returns set of fully qualified class names for build config .
"""Returns set of fully qualified class names for build config.""" # Read the location of the java_sources_file from the build_config # Read the java_sources_file, indexing the classes found # |unprocessed_jar_path| is set for prebuilt targets. (ex: # android_aar_prebuilt()) # |unprocessed_jar_path| might be set but not exist if not all targets have # been built. # Normalize path but do not follow symlink if .jar is symlink.
self
deps_info
Dict