Home
last modified time | relevance | path

Searched refs:cls (Results 1 – 25 of 59) sorted by relevance

123

/tools/test/connectivity/acts/framework/acts/controllers/buds_lib/test_actions/
Dbase_test_actions.py72 def _fill_default_action_map(cls): argument
75 cls._action_map = dict()
76 for name, _ in inspect.getmembers(cls, inspect.ismethod):
77 act_name = cls._convert_default_action_name(name)
79 cls._action_map[act_name] = name
82 def _convert_default_action_name(cls, func_name): argument
94 def _add_action_alias(cls, default_act_name, alias): argument
96 if default_act_name in cls._action_map:
97 cls._action_map[alias] = cls._action_map[default_act_name]
103 def _get_action_names(cls): argument
[all …]
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DResources.java45 public static byte[] toByteArray(Class<?> cls, String resourceName) throws IOException { in toByteArray() argument
46 try (InputStream in = cls.getResourceAsStream(resourceName)) { in toByteArray()
54 public static InputStream toInputStream(Class<?> cls, String resourceName) throws IOException { in toInputStream() argument
55 InputStream in = cls.getResourceAsStream(resourceName); in toInputStream()
63 Class <?> cls, String resourceName) throws IOException, CertificateException { in toCertificate() argument
64 try (InputStream in = cls.getResourceAsStream(resourceName)) { in toCertificate()
73 Class <?> cls, String resourceName) throws IOException, CertificateException { in toCertificateChain() argument
75 try (InputStream in = cls.getResourceAsStream(resourceName)) { in toCertificateChain()
88 public static PrivateKey toPrivateKey(Class <?> cls, String resourceName) in toPrivateKey() argument
96 return toPrivateKey(cls, resourceName, keyAlgorithm); in toPrivateKey()
[all …]
/tools/asuite/atest/metrics/
Dmetrics_base.py101 def __new__(cls, **kwargs): argument
112 if not cls.tool_name:
115 allowed = ({constants.EXTERNAL} if cls._user_type == EXTERNAL_USER
117 fields = [k for k, v in vars(cls).items()
123 params = {'user_key': cls._user_key,
124 'run_id': cls._run_id,
125 'user_type': cls._user_type,
126 'tool_name': cls.tool_name,
127 cls._EVENT_NAME: fields_and_values}
128 log_event = cls._build_full_event(
[all …]
/tools/asuite/atest-py2/metrics/
Dmetrics_base.py101 def __new__(cls, **kwargs): argument
112 if not cls.tool_name:
115 allowed = ({constants.EXTERNAL} if cls._user_type == EXTERNAL_USER
117 fields = [k for k, v in vars(cls).items()
123 params = {'user_key': cls._user_key,
124 'run_id': cls._run_id,
125 'user_type': cls._user_type,
126 'tool_name': cls.tool_name,
127 cls._EVENT_NAME: fields_and_values}
128 log_event = cls._build_full_event(ATEST_EVENTS[cls._user_type](**params))
[all …]
/tools/asuite/aidegen/lib/
Dsingleton.py35 def __call__(cls, *args, **kwds): argument
37 if cls not in cls._instances:
38 cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwds)
39 return cls._instances[cls]
Dnative_project_info.py67 def _init_modules_info(cls): argument
69 if cls.modules_info:
71 cls.modules_info = native_module_info.NativeModuleInfo()
74 def generate_projects(cls, targets): argument
93 cls._init_modules_info()
94 need_builds = cls._get_need_builds(targets)
108 def _get_need_builds(cls, targets): argument
/tools/metalava/src/main/java/com/android/tools/metalava/apilevels/
DAddApisFromCodebase.kt34 override fun afterVisitClass(cls: ClassItem) { in addApisFromCodebase()
38 override fun visitClass(cls: ClassItem) { in addApisFromCodebase()
39 val newClass = api.addClass(cls.internalName(), apiLevel, cls.deprecated) in addApisFromCodebase()
42 if (cls.isClass()) { in addApisFromCodebase()
46 val filteredSuperClass = cls.filteredSuperclass(filterReference) in addApisFromCodebase()
47 val superClass = cls.superClass() in addApisFromCodebase()
83 } else if (cls.isInterface()) { in addApisFromCodebase()
84 val superClass = cls.superClass() in addApisFromCodebase()
88 } else if (cls.isEnum()) { in addApisFromCodebase()
97 } else if (cls.isAnnotationType()) { in addApisFromCodebase()
[all …]
DApiClass.java170 ApiClass cls = allClasses.get(superClass.getName()); in removeImplicitInterfaces() local
171 if (cls != null && cls.implementsInterface(interfaceElement, allClasses)) { in removeImplicitInterfaces()
187 ApiClass cls = allClasses.get(localInterface.getName()); in implementsInterface() local
188 if (cls != null && cls.implementsInterface(interfaceElement, allClasses)) { in implementsInterface()
196 ApiClass cls = allClasses.get(superClass.getName()); in implementsInterface() local
197 if (cls != null && cls.implementsInterface(interfaceElement, allClasses)) { in implementsInterface()
247 ApiClass cls = allClasses.get(parent.getName()); in isOverrideOfInherited() local
248 if (cls != null && cls.isOverride(method, allClasses)) { in isOverrideOfInherited()
/tools/metalava/src/main/java/com/android/tools/metalava/
DSignatureWriter.kt137 override fun visitClass(cls: ClassItem) { in <lambda>()
140 writeModifiers(cls) in <lambda>()
142 if (cls.isAnnotationType()) { in <lambda>()
153 } else if (cls.isInterface()) { in <lambda>()
155 …} else if (!compatibility.classForEnums && cls.isEnum()) { // compat mode calls enums "class" inst… in <lambda>()
161 writer.print(cls.fullName()) in <lambda>()
162 writeTypeParameterList(cls.typeParameterList(), addSpace = false) in <lambda>()
163 writeSuperClassStatement(cls) in <lambda>()
164 writeInterfaceList(cls) in <lambda>()
169 override fun afterVisitClass(cls: ClassItem) { in <lambda>()
[all …]
DJDiffXmlWriter.kt88 override fun visitClass(cls: ClassItem) { in <lambda>()
91 if (cls.isInterface()) { in <lambda>()
97 writer.print(cls.fullName()) in <lambda>()
102 writeSuperClassAttribute(cls) in <lambda>()
104 val modifiers = cls.modifiers in <lambda>()
112 writer.print(deprecation(cls)) in <lambda>()
117 writeInterfaceList(cls) in <lambda>()
119 if (cls.isEnum() && compatibility.defaultEnumMethods) { in <lambda>()
158 override fun afterVisitClass(cls: ClassItem) { in <lambda>()
160 if (cls.isInterface()) { in <lambda>()
[all …]
DArtifactTagger.kt79 override fun visitClass(cls: ClassItem) { in any()
80 if (cls.artifact == null && cls.isTopLevelClass()) { in any()
82 Issues.NO_ARTIFACT_DATA, cls, in any()
101 for (cls in pkg.allClasses()) { in applyArtifactsFromSpec() constant
102 if (!cls.emit) { in applyArtifactsFromSpec()
105 if (cls.artifact == null) { in applyArtifactsFromSpec()
106 cls.artifact = mavenSpec in applyArtifactsFromSpec()
109 Issues.BROKEN_ARTIFACT_FILE, cls, in applyArtifactsFromSpec()
DDexApiWriter.kt38 override fun visitClass(cls: ClassItem) { in visitClass()
39 if (filterEmit.test(cls)) { in visitClass()
40 writer.print(cls.toType().internalName()) in visitClass()
68 val cls = field.containingClass() in visitField() constant
70 writer.print(cls.toType().internalName()) in visitField()
DProguardWriter.kt43 override fun visitClass(cls: ClassItem) { in visitClass()
45 writer.print(cls.qualifiedNameWithDollarInnerClasses()) in visitClass()
49 override fun afterVisitClass(cls: ClassItem) { in afterVisitClass()
130 val cls = t.asClass() ?: return t.toCanonicalType() in getCleanTypeName() constant
131 var qualifiedName = cls.qualifiedNameWithDollarInnerClasses() in getCleanTypeName()
/tools/asuite/atest-py2/test_finders/
Dtest_finder_base.py25 def find_method_register(cls): argument
27 cls.find_methods = []
28 cls.get_all_find_methods = lambda x: x.find_methods
29 for methodname in dir(cls):
30 method = getattr(cls, methodname)
32 cls.find_methods.append(Finder(None, method, None))
33 return cls
/tools/asuite/atest/test_finders/
Dtest_finder_base.py25 def find_method_register(cls): argument
27 cls.find_methods = []
28 cls.get_all_find_methods = lambda x: x.find_methods
29 for methodname in dir(cls):
30 method = getattr(cls, methodname)
32 cls.find_methods.append(Finder(None, method, None))
33 return cls
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiPackageItem.kt75 fun addClass(cls: PsiClassItem) { in addClass()
76 if (!cls.isTopLevelClass()) { in addClass()
92 classes.add(cls) in addClass()
93 cls.containingPackage = this in addClass()
97 for (cls in classList) { in addClasses() method
98 addClass(cls) in addClasses()
119 for (cls in initialClasses) { in hashCode() variable
120 cls.finishInitialization() in hashCode()
128 for (cls in added) { in hashCode() constant
129 cls.finishInitialization() in hashCode()
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/api/
Dmonsoon.py52 def get_closest_valid_voltage(cls, voltage): argument
54 if voltage < cls.MIN_VOLTAGE / 2:
57 return max(cls.MIN_VOLTAGE, min(voltage, cls.MAX_VOLTAGE))
60 def is_voltage_valid(cls, voltage): argument
65 return cls.get_closest_valid_voltage(voltage) == voltage
68 def validate_voltage(cls, voltage): argument
70 if not cls.is_voltage_valid(voltage):
73 (voltage, cls.MIN_VOLTAGE, cls.MAX_VOLTAGE))
/tools/metalava/src/test/java/com/android/tools/metalava/model/text/
DTextTypeItemTest.kt81 val cls = codebase.findClass("androidx.navigation.NavDestinationBuilder") in check erasure() constant
82 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure()
117 val cls = codebase.findClass("test.pkg.TestClass") in check erasure from object() constant
118 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure from object()
149 val cls = codebase.findClass("test.pkg.EnumMap") in check erasure from enums() constant
150 val method = cls?.findMethod("clone", "") as TextMethodItem in check erasure from enums()
/tools/acloud/internal/lib/
Dadb_tools.py88 def _CheckAdb(cls): argument
94 if cls._adb_command:
96 cls._adb_command = utils.FindExecutable(constants.ADB_BIN)
97 if not cls._adb_command:
164 def GetDeviceSerials(cls): argument
166 cls._CheckAdb()
167 adb_cmd = [cls._adb_command, _ADB_DEVICE]
Dandroid_compute_client.py125 def _FormalizeName(cls, name): argument
141 name = name[:cls.NAME_LENGTH_LIMIT]
143 name = name[:-1] + cls.REPLACER
163 def GenerateImageName(cls, build_target=None, build_id=None): argument
175 name = cls.IMAGE_NAME_FMT.format(
179 return cls._FormalizeName(name)
182 def GetDataDiskName(cls, instance): argument
191 name = cls.DATA_DISK_NAME_FMT.format(instance=instance)
192 return cls._FormalizeName(name)
Dbase_cloud_client.py73 def InitResourceHandle(cls, oauth2_credentials): argument
87 exception_types=cls.RETRIABLE_AUTH_ERRORS,
88 max_retries=cls.RETRY_COUNT,
90 sleep_multiplier=cls.RETRY_SLEEP_MULTIPLIER,
91 retry_backoff_factor=cls.RETRY_BACKOFF_FACTOR,
92 serviceName=cls.API_NAME,
93 version=cls.API_VERSION,
/tools/metalava/src/main/java/com/android/tools/metalava/stub/
DStubWriter.kt185 override fun visitClass(cls: ClassItem) { in <lambda>()
186 if (cls.isTopLevelClass()) { in <lambda>()
187 val sourceFile = getClassFile(cls) in <lambda>()
197 stubWriter = if (options.kotlinStubs && cls.isKotlin()) { in <lambda>()
204 val compilationUnit = cls.getCompilationUnit() in <lambda>()
207 stubWriter?.visitClass(cls) in <lambda>()
210 override fun afterVisitClass(cls: ClassItem) { in <lambda>()
211 stubWriter?.afterVisitClass(cls) in <lambda>()
213 if (cls.isTopLevelClass()) { in <lambda>()
/tools/test/connectivity/acts/framework/tests/libs/
Dversion_selector_test.py78 def class_func(cls, arg1): argument
79 return cls, arg1
110 def setUpClass(cls): argument
111 cls.tmp_dir = tempfile.mkdtemp()
114 def tearDownClass(cls): argument
115 shutil.rmtree(cls.tmp_dir)
159 def test_1(cls): argument
/tools/asuite/aidegen/idea/
Diml.py82 def get_unique_iml_name(cls, abs_module_path): argument
106 if abs_module_path in cls.USED_NAME_CACHE:
107 return cls.USED_NAME_CACHE[abs_module_path]
110 if any(uniq_name == name for name in cls.USED_NAME_CACHE.values()):
120 if uniq_name not in cls.USED_NAME_CACHE.values():
127 while uniq_name in cls.USED_NAME_CACHE.values():
130 cls.USED_NAME_CACHE[abs_module_path] = uniq_name
/tools/acloud/public/
Dreport.py80 def IsMoreSevere(cls, candidate, reference): argument
94 if (candidate not in cls.SEVERITY_ORDER or
95 reference not in cls.SEVERITY_ORDER):
98 return cls.SEVERITY_ORDER[candidate] > cls.SEVERITY_ORDER[reference]

123