Home
last modified time | relevance | path

Searched refs:cls (Results 1 – 25 of 60) 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/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]
Dandroid_dev_os.py46 def get_os_name(cls): argument
52 return cls.get_os_type().name
55 def get_os_type(cls): argument
62 'Darwin': cls.MAC,
63 'Linux': cls.LINUX,
64 'Windows': cls.WINDOWS
65 }.get(platform.system(), cls.LINUX)
Dnative_project_info.py63 def _init_modules_info(cls): argument
65 if cls.modules_info:
67 cls.modules_info = native_module_info.NativeModuleInfo()
70 def generate_projects(cls, targets): argument
91 cls._init_modules_info()
92 need_builds = cls._get_need_builds(targets)
97 def _get_need_builds(cls, targets): argument
/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/tradefederation/core/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(ATEST_EVENTS[cls._user_type](**params))
[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/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/tradefederation/core/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/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/
DArtifactTagger.kt80 override fun visitClass(cls: ClassItem) { in any()
81 if (cls.artifact == null && cls.isTopLevelClass()) { in any()
83 Issues.NO_ARTIFACT_DATA, cls, in any()
102 for (cls in pkg.allClasses()) { in applyArtifactsFromSpec() constant
103 if (!cls.emit) { in applyArtifactsFromSpec()
106 if (cls.artifact == null) { in applyArtifactsFromSpec()
107 cls.artifact = mavenSpec in applyArtifactsFromSpec()
110 Issues.BROKEN_ARTIFACT_FILE, cls, in applyArtifactsFromSpec()
DJDiffXmlWriter.kt85 override fun visitClass(cls: ClassItem) { in <lambda>()
88 if (cls.isInterface()) { in <lambda>()
94 writer.print(cls.fullName()) in <lambda>()
99 writeSuperClassAttribute(cls) in <lambda>()
101 val modifiers = cls.modifiers in <lambda>()
109 writer.print(deprecation(cls)) in <lambda>()
114 writeInterfaceList(cls) in <lambda>()
116 if (cls.isEnum() && compatibility.defaultEnumMethods) { in <lambda>()
155 override fun afterVisitClass(cls: ClassItem) { in <lambda>()
157 if (cls.isInterface()) { in <lambda>()
[all …]
DSignatureWriter.kt144 override fun visitClass(cls: ClassItem) { in <lambda>()
147 writeModifiers(cls) in <lambda>()
149 if (cls.isAnnotationType()) { in <lambda>()
160 } else if (cls.isInterface()) { in <lambda>()
162 …} else if (!compatibility.classForEnums && cls.isEnum()) { // compat mode calls enums "class" inst… in <lambda>()
168 writer.print(cls.fullName()) in <lambda>()
169 writeTypeParameterList(cls.typeParameterList(), addSpace = false) in <lambda>()
170 writeSuperClassStatement(cls) in <lambda>()
171 writeInterfaceList(cls) in <lambda>()
176 override fun afterVisitClass(cls: ClassItem) { in <lambda>()
[all …]
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/metalava/src/main/java/com/android/tools/metalava/model/visitors/
DApiVisitor.kt116 open fun include(cls: ClassItem): Boolean { in include()
117 if (skip(cls)) { in include()
121 if (filter != null && !filter.matches(cls.containingPackage())) { in include()
125 return cls.emit || cls.codebase.preFiltered in include()
133 if (!include(vc.cls)) { in include()
144 return vc.cls.emit && (includeEmptyOuterClasses || shouldEmitClassBody(vc)) in shouldEmitClass()
151 return if (filterEmit.test(vc.cls)) { in shouldEmitClassBody()
154 filterReference.test(vc.cls) in shouldEmitClassBody()
/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/test/connectivity/acts/framework/tests/
Dacts_test_decorators_test.py155 def setUpClass(cls): argument
156 cls.tmp_dir = tempfile.mkdtemp()
157 cls.MOCK_CONFIG = mobly_config_parser.TestRunConfig()
158 cls.MOCK_CONFIG.testbed_name = 'SampleTestBed'
159 cls.MOCK_CONFIG.log_path = cls.tmp_dir
161 cls.MOCK_TEST_RUN_LIST = [(MockTest.__name__,
165 def tearDownClass(cls): argument
166 shutil.rmtree(cls.tmp_dir)
/tools/metalava/src/test/java/com/android/tools/metalava/model/text/
DTextTypeItemTest.kt82 val cls = codebase.findClass("androidx.navigation.NavDestinationBuilder") in check erasure() constant
83 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure()
118 val cls = codebase.findClass("test.pkg.TestClass") in check erasure from object() constant
119 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure from object()
150 val cls = codebase.findClass("test.pkg.EnumMap") in check erasure from enums() constant
151 val method = cls?.findMethod("clone", "") as TextMethodItem in check erasure from enums()
/tools/acloud/public/
Dreport.py79 def IsMoreSevere(cls, candidate, reference): argument
93 if (candidate not in cls.SEVERITY_ORDER or
94 reference not in cls.SEVERITY_ORDER):
97 return cls.SEVERITY_ORDER[candidate] > cls.SEVERITY_ORDER[reference]
/tools/acloud/internal/lib/
Dbase_cloud_client.py74 def InitResourceHandle(cls, oauth2_credentials): argument
88 exception_types=cls.RETRIABLE_AUTH_ERRORS,
89 max_retries=cls.RETRY_COUNT,
91 sleep_multiplier=cls.RETRY_SLEEP_MULTIPLIER,
92 retry_backoff_factor=cls.RETRY_BACKOFF_FACTOR,
93 serviceName=cls.API_NAME,
94 version=cls.API_VERSION,
Dandroid_compute_client.py107 def _FormalizeName(cls, name): argument
123 name = name[:cls.NAME_LENGTH_LIMIT]
125 name = name[:-1] + cls.REPLACER
145 def GenerateImageName(cls, build_target=None, build_id=None): argument
157 name = cls.IMAGE_NAME_FMT.format(
161 return cls._FormalizeName(name)
164 def GetDataDiskName(cls, instance): argument
173 name = cls.DATA_DISK_NAME_FMT.format(instance=instance)
174 return cls._FormalizeName(name)
/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/test/connectivity/acts/framework/acts/metrics/
Dlogger.py102 def for_test_case(cls, *args, **kwargs): argument
112 return TestCaseLoggerProxy(cls, args, kwargs)
115 def for_test_class(cls, *args, **kwargs): argument
125 return TestClassLoggerProxy(cls, args, kwargs)
128 def _compile_proto(cls, proto_path, compiler_out=None): argument
143 classfile = inspect.getfile(cls)

123