Home
last modified time | relevance | path

Searched refs:method (Results 1 – 25 of 164) sorted by relevance

1234567

/tools/metalava/src/main/java/com/android/tools/metalava/
DApiLint.kt257 override fun visitMethod(method: MethodItem) { in <lambda>()
258 checkMethod(method, filterReference) in <lambda>()
259 val returnType = method.returnType() in <lambda>()
261 checkType(returnType, method) in <lambda>()
263 for (parameter in method.parameters()) { in <lambda>()
266 kotlinInterop?.checkMethod(method) in <lambda>()
350 method: MethodItem, in <lambda>()
353 if (!method.isConstructor()) { in <lambda>()
354 checkMethodNames(method) in <lambda>()
355 checkProtected(method) in <lambda>()
[all …]
DKotlinInteropChecks.kt53 override fun visitMethod(method: MethodItem) { in <lambda>()
54 checkMethod(method, isKotlin) in <lambda>()
70 fun checkMethod(method: MethodItem, isKotlin: Boolean = method.isKotlin()) { in <lambda>()
71 if (!method.isConstructor()) { in <lambda>()
73 ensureDefaultParamsHaveJvmOverloads(method) in <lambda>()
74 ensureCompanionJvmStatic(method) in <lambda>()
75 ensureExceptionsDocumented(method) in <lambda>()
77 ensureMethodNameNotKeyword(method) in <lambda>()
78 ensureParameterNamesNotKeywords(method) in <lambda>()
80 ensureLambdaLastParameter(method) in <lambda>()
[all …]
DApiAnalyzer.kt343 for (method in interfaceClass.methods()) { in <lambda>() constant
344 val name = method.name() in <lambda>()
350 list.add(method) in <lambda>()
357 for (method in superClass.methods()) { in <lambda>() method
358 if (!method.modifiers.isAbstract() || !method.modifiers.isPublicOrProtected()) { in <lambda>()
361 val name = method.name() in <lambda>()
367 list.add(method) in <lambda>()
391 for (method in superClass.methods()) { in <lambda>() variable
392 if (method.modifiers.isAbstract() || !method.modifiers.isPublic()) { in <lambda>()
396 if (method.hasHiddenType(filterReference)) { in <lambda>()
[all …]
DNullabilityAnnotationsValidator.kt47 val method: MethodItem in <lambda>() constant
51 override val method: MethodItem, in <lambda>() constant in com.android.tools.metalava.NullabilityAnnotationsValidator.Error
56 return "ERROR: $method, $label, $type" in <lambda>()
65 override val method: MethodItem, in <lambda>() constant in com.android.tools.metalava.NullabilityAnnotationsValidator.Warning
70 return "WARNING: $method, $label, $type" in <lambda>()
90 override fun visitMethod(method: MethodItem) { in <lambda>()
91 checkItem(method, RETURN_LABEL, method.returnType(), method) in <lambda>()
117 private fun checkItem(method: MethodItem, label: String, type: TypeItem?, item: Item) { in <lambda>()
119 throw DriverException("Missing type on $method item $label") in <lambda>()
121 if (method.isEnumValueOfString()) { in <lambda>()
[all …]
DSignatureWriter.kt110 override fun visitMethod(method: MethodItem) { in <lambda>()
111 … if (compatibility.skipAnnotationInstanceMethods && method.containingClass().isAnnotationType() && in <lambda>()
112 !method.modifiers.isStatic() in <lambda>()
117 if (compatibility.skipInheritedMethods && method.inheritedMethod) { in <lambda>()
122 writeModifiers(method) in <lambda>()
123 writeTypeParameterList(method.typeParameterList(), addSpace = true) in <lambda>()
125 writeType(method, method.returnType()) in <lambda>()
127 writer.print(method.name()) in <lambda>()
128 writeParameterList(method) in <lambda>()
129 writeThrowsList(method) in <lambda>()
[all …]
DAndroidApiChecks.kt53 override fun visitMethod(method: MethodItem) { in check()
54 checkRequiresPermission(method) in check()
55 if (!method.isConstructor()) { in check()
56 … checkVariable(method, "@return", "Return value of '" + method.name() + "'", method.returnType()) in check()
175 private fun checkRequiresPermission(method: MethodItem) { in checkRequiresPermission()
176 val text = method.documentation in checkRequiresPermission()
178 … val annotation = method.modifiers.findAnnotation("android.support.annotation.RequiresPermission") in checkRequiresPermission()
199 Issues.REQUIRES_PERMISSION, method, "Method '" + method.name() + in checkRequiresPermission()
207 Issues.REQUIRES_PERMISSION, method, "Method '" + method.name() + in checkRequiresPermission()
DJDiffXmlWriter.kt239 override fun visitMethod(method: MethodItem) { in <lambda>()
240 val modifiers = method.modifiers in <lambda>()
242 if (method.containingClass().isAnnotationType() && compatibility.xmlSkipAnnotationMethods) { in <lambda>()
250 writer.print(method.name()) in <lambda>()
251 method.returnType()?.let { in <lambda>()
266 writer.print(deprecation(method)) in <lambda>()
271 writeParameterList(method) in <lambda>()
272 writeThrowsList(method) in <lambda>()
337 private fun writeParameterList(method: MethodItem) { in <lambda>()
338 method.parameters().asSequence().forEach { parameter -> in <lambda>()
[all …]
DDexApiWriter.kt55 override fun visitMethod(method: MethodItem) { in visitMethod()
56 if (method.inheritedMethod) { in visitMethod()
60 writer.print(method.containingClass().toType().internalName()) in visitMethod()
62 writer.print(method.internalName()) in visitMethod()
64 for (pi in method.parameters()) { in visitMethod()
68 if (method.isConstructor()) { in visitMethod()
71 val returnType = method.returnType() in visitMethod()
76 writeLocation(method) in visitMethod()
/tools/metalava/manual/
Dmaster.txt5method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, condi…
6method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, condi…
11 method @NonNull public android.graphics.Path.FillType getFillType();
14 method @NonNull public String flattenToString();
15 method @NonNull public String toShortString();
16 method @Nullable public static android.graphics.Rect unflattenFromString(@Nullable String);
19 method @NonNull public String toShortString();
24method @RequiresPermission(allOf={android.Manifest.permission.READ_LOGS, android.Manifest.permissi…
27 method @Nullable public android.os.IBinder[] createBinderArray();
28 method @Nullable public java.util.ArrayList<android.os.IBinder> createBinderArrayList();
[all …]
/tools/tradefederation/core/util-apps/WifiUtil/src/com/android/tradefed/utils/wifi/
DWifiUtil.java173 final String method = expectString("method"); in onStart() local
185 if ("addOpenNetwork".equals(method)) { in onStart()
191 } else if ("addWpaPskNetwork".equals(method)) { in onStart()
198 } else if ("associateNetwork".equals(method)) { in onStart()
204 } else if ("disconnect".equals(method)) { in onStart()
207 } else if ("disableNetwork".equals(method)) { in onStart()
212 } else if ("isWifiEnabled".equals(method)) { in onStart()
215 } else if ("getIpAddress".equals(method)) { in onStart()
227 } else if ("getSSID".equals(method)) { in onStart()
232 } else if ("getBSSID".equals(method)) { in onStart()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/stub/
DJavaStubWriter.kt354 override fun visitMethod(method: MethodItem) { in <lambda>()
355 if (method.containingClass().notStrippable) { in <lambda>()
358 writeMethod(method.containingClass(), method, false) in <lambda>()
361 …private fun writeMethod(containingClass: ClassItem, method: MethodItem, movedFromInterface: Boolea… in <lambda>()
362 val modifiers = method.modifiers in <lambda>()
366 if (isEnum && (method.name() == "values" || in <lambda>()
367 method.name() == "valueOf" && method.parameters().size == 1 && in <lambda>()
368 method.parameters()[0].type().toTypeString() == JAVA_LANG_STRING) in <lambda>()
377 appendDocumentation(method, writer) in <lambda>()
383 appendModifiers(method, modifiers, removeAbstract, movedFromInterface) in <lambda>()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiMethodItem.kt173 val method = psiMethod as? UMethod ?: return emptySet() in <lambda>() constant
180 method.accept(object : AbstractUastVisitor() { in <lambda>()
279 val method = this in <lambda>() constant
285 modifierString, method.modifiers, method, in <lambda>()
299 val returnType = method.returnType() in <lambda>()
303 sb.append(method.name()) in <lambda>()
306 method.parameters().asSequence().forEachIndexed { i, parameter -> in <lambda>()
317 val throws = method.throwsTypes().asSequence().sortedWith(ClassItem.fullNameComparator) in <lambda>()
330 val defaultValue = PsiTypesUtil.getDefaultValueOfType(method.psiMethod.returnType) in <lambda>()
371 val method = PsiMethodItem( in <lambda>() constant
[all …]
DPsiClassItem.kt211 for (method in methods) { in <lambda>() method
212 method.finishInitialization() in <lambda>()
214 for (method in constructors) { in <lambda>() method
215 method.finishInitialization() in <lambda>()
331 val method = template as PsiMethodItem in <lambda>() constant
336 newMethod = PsiMethodItem.create(codebase, this, method) in <lambda>()
338 val stub = method.toStub(replacementMap) in <lambda>()
341 newMethod.inheritedMethod = method.inheritedMethod in <lambda>()
342 newMethod.documentation = method.documentation in <lambda>()
362 override fun addMethod(method: MethodItem) { in <lambda>()
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/model/text/
DTextTypeItemTest.kt83 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure() constant
84 assertThat(method).isNotNull() in check erasure()
88 method in check erasure()
98 context = method in check erasure()
119 val method = cls?.findMethod("build", "") as TextMethodItem in check erasure from object() constant
120 assertThat(method).isNotNull() in check erasure from object()
130 context = method in check erasure from object()
151 val method = cls?.findMethod("clone", "") as TextMethodItem in check erasure from enums() constant
152 assertThat(method).isNotNull() in check erasure from enums()
160 context = method in check erasure from enums()
[all …]
/tools/metalava/
DFORMAT.md40 changes. (For example, you can change the return value of a final method from
75 Annotations are included on the same line as the class/field/method, right
82 method @Nullable public static Integer compute1(@Nullable java.util.List<java.lang.String>);
145 method public Integer? compute1(java.util.List<java.lang.String!>?);
197 Similarly, v1 used erasure in throws clauses. For example, for this method:
208method public <X extends java.lang.Throwable> T orElseThrow(java.util.function.Supplier<? extends …
216method public <X extends java.lang.Throwable> T orElseThrow(java.util.function.Supplier<? extends …
236 method public abstract String category() default "";
237 method public abstract boolean deepExport() default false;
238 method public abstract android.view.ViewDebug.FlagToString[] flagMapping() default {};
[all …]
/tools/repohooks/tools/
Dpylintrc82 cmp-method,
84 coerce-method,
85 delslice-method,
91 dict-iter-method,
94 dict-view-method,
95 div-method,
100 getslice-method,
101 hex-method,
102 idiv-method,
112 next-method-called,
[all …]
/tools/test/connectivity/acts/tests/google/tel/live/
DTelLiveStressFdrTest.py81 for method in ("_check_volte", "_check_csfb",
83 func = getattr(self, method)
87 self.dut.log.error("%s failed with %s", method, e)
89 self.dut.log.info("%s is %s before tests start", method,
92 self.default_testing_func_names.append(method)
100 for method in ("_check_subscription", "_check_data", "_check_mms_mt",
103 func = getattr(self, method)
105 self.log.error("%s failed", method)
106 failed_tests.append(method)
107 for method in args:
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DMethodItem.kt162 for (method in superMethods) { in <lambda>() constant
163 if (predicate.test(method)) { in <lambda>()
164 return method in <lambda>()
168 for (method in superMethods) { in <lambda>() constant
169 val found = method.findPredicateSuperMethod(predicate) in <lambda>()
275 …fun sameSignature(method: MethodItem, superMethod: MethodItem, compareRawTypes: Boolean = false): … in <lambda>()
278 if (method.returnType() != superMethod.returnType()) { in <lambda>()
282 if (method.deprecated != superMethod.deprecated && in <lambda>()
283 (!compatibility.hideDifferenceImplicit || !method.deprecated)) { in <lambda>()
289 if (!method.modifiers.equivalentTo(superMethod.modifiers)) { in <lambda>()
[all …]
DClassItem.kt264 for (method in methods()) { in <lambda>() method
265 method.accept(visitor) in <lambda>()
348 for (method in methods()) { in <lambda>() method
349 method.acceptTypes(visitor) in <lambda>()
499 private fun parametersMatch(method: MethodItem, description: String): Boolean { in <lambda>()
501 val parameters = method.parameters() in <lambda>()
511 val parameter = parameters[i].type().toErasedTypeString(method) in <lambda>()
570 for (method in methods()) { in <lambda>() constant
571 if (predicate.test(method) || method.findPredicateSuperMethod(predicate) != null) { in <lambda>()
574 methods.remove(method) in <lambda>()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DDeviceTestCase.java328 for (Method method : methods) { in getTestMethodNames()
330 if (!overridenMethod.contains(method.getName())) { in getTestMethodNames()
332 if (Modifier.isPublic(method.getModifiers()) in getTestMethodNames()
333 && method.getReturnType().equals(Void.TYPE) in getTestMethodNames()
334 && method.getParameterTypes().length == 0 in getTestMethodNames()
335 && method.getName().startsWith("test")) { in getTestMethodNames()
337 if (theClass.equals(method.getDeclaringClass())) { in getTestMethodNames()
338 overridenMethod.add(method.getName()); in getTestMethodNames()
342 theClass.getPackage().getName(), theClass, method)) { in getTestMethodNames()
343 mMethodNames.addElement(method.getName()); in getTestMethodNames()
/tools/dexter/testdata/expected/
Dentry_hooks.asm2 method Base.<init>():void label
15 method Base.foo(int, java.lang.String):int label
55 method Derived.<init>():void label
68 method Derived.foo(int, java.lang.String):int label
110 method Target.<init>():void label
123 method Target.main(java.lang.String[]):void label
159 method Target.test():int label
191 method Target.foo(int):int label
208 method Target.foo(int, int):int label
227 method Target.foo(int, java.lang.String):int label
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/doclava1/
DApiFile.java448 TextConstructorItem method; in parseConstructor() local
463method = new TextConstructorItem(api, name, cl, modifiers, cl.asTypeInfo(), tokenizer.pos()); in parseConstructor()
464 method.setDeprecated(modifiers.isDeprecated()); in parseConstructor()
465 parseParameterList(api, tokenizer, method); in parseConstructor()
468 token = parseThrows(tokenizer, method); in parseConstructor()
473 cl.addConstructor(method); in parseConstructor()
480 TextMethodItem method; in parseMethod() local
528 method = new TextMethodItem(api, name, cl, modifiers, returnType, tokenizer.pos()); in parseMethod()
529 method.setDeprecated(modifiers.isDeprecated()); in parseMethod()
533 method.setTypeParameterList(typeParameterList); in parseMethod()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/apilevels/
DApiClass.java213 ApiElement method = entry.getValue(); in removeOverridingMethods() local
214 … if (!method.getName().startsWith("<init>(") && isOverrideOfInherited(method, allClasses)) { in removeOverridingMethods()
228 private boolean isOverride(ApiElement method, Map<String, ApiClass> allClasses) { in isOverride() argument
229 String name = method.getName(); in isOverride()
231 if (localMethod != null && localMethod.introducedNotLaterThan(method)) { in isOverride()
236 return isOverrideOfInherited(method, allClasses); in isOverride()
242 private boolean isOverrideOfInherited(ApiElement method, Map<String, ApiClass> allClasses) { in isOverrideOfInherited() argument
246 if (parent.introducedNotLaterThan(method)) { in isOverrideOfInherited()
248 if (cls != null && cls.isOverride(method, allClasses)) { in isOverrideOfInherited()
/tools/test/connectivity/acts/framework/acts/controllers/sl4a_lib/
Drpc_client.py231 def rpc(self, method, *args, timeout=None, retries=3): argument
254 data = {'id': ticket, 'method': method, 'params': args}
266 method, i)
271 method, i)
281 'or disconnect.', method)
292 method, ticket, timeout or SOCKET_TIMEOUT)
313 rpc_name=method)
316 sl4a_api_error = Sl4aApiError(error_object, rpc_name=method)
320 self._log.error('RPC method %s with mismatched api id %s', method,
/tools/tradefederation/core/
Dpylintrc16 # Naming hint for method names
17 method-name-hint=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
19 # Regular expression matching correct method names
20 method-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
27 # Maximum number of arguments for function / method
30 # Maximum number of return / yield for function / method body

1234567