tools/android/modularization/convenience/lookup_dep.py
def match(self, search_string: str) -> List[ClassEntry]:
    """Get class/target entries where the class matches search_string"""
    # Priority 1: Exact full matches
    if search_string in self._class_index:
      return self._entries_for(search_string)

    # Priority 2: Match full class name (any case), if it's a class name
    matches = []
    lower_search_string = search_string.lower()
    if '.' not in lower_search_string:
      for full_class_name in self._class_index:
        package_and_class = full_class_name.rsplit('.', 1)
        if len(package_and_class) < 2:
          continue
        class_name = package_and_class[1]
        class_lower = class_name.lower()
        if class_lower == lower_search_string:
          matches.extend(self._entries_for(full_class_name))
      if matches:
        return matches

    # Priority 3: Match anything
    for full_class_name in self._class_index:
      if lower_search_string in full_class_name.lower():
        matches.extend(self._entries_for(full_class_name))

    return matches
Get class/target entries where the class matches search_string
Get class/target entries where the class matches search_string
Get class / target entries where the class matches search_string
def match(self, search_string: str) -> List[ClassEntry]:
    if search_string in self._class_index:
      return self._entries_for(search_string)
    matches = []
    lower_search_string = search_string.lower()
    if '.' not in lower_search_string:
      for full_class_name in self._class_index:
        package_and_class = full_class_name.rsplit('.', 1)
        if len(package_and_class) < 2:
          continue
        class_name = package_and_class[1]
        class_lower = class_name.lower()
        if class_lower == lower_search_string:
          matches.extend(self._entries_for(full_class_name))
      if matches:
        return matches
    for full_class_name in self._class_index:
      if lower_search_string in full_class_name.lower():
        matches.extend(self._entries_for(full_class_name))
    return matches
def match ( self , search_string : str ) -> List [ ClassEntry ] : if search_string in self . _class_index : return self . _entries_for ( search_string ) matches = [ ] lower_search_string = search_string . lower ( ) if '.' not in lower_search_string : for full_class_name in self . _class_index : package_and_class = full_class_name . rsplit ( '.' , 1 ) if len ( package_and_class ) < 2 : continue class_name = package_and_class [ 1 ] class_lower = class_name . lower ( ) if class_lower == lower_search_string : matches . extend ( self . _entries_for ( full_class_name ) ) if matches : return matches for full_class_name in self . _class_index : if lower_search_string in full_class_name . lower ( ) : matches . extend ( self . _entries_for ( full_class_name ) ) return matches
Get class/target entries where the class matches search_string
Get class / target entries where the class matches search_string
"""Get class/target entries where the class matches search_string""" # Priority 1: Exact full matches # Priority 2: Match full class name (any case), if it's a class name # Priority 3: Match anything
self
search_string
str