Home
last modified time | relevance | path

Searched refs:item (Results 1 – 25 of 268) sorted by relevance

1234567891011

/tools/metalava/src/main/java/com/android/tools/metalava/
DDocAnalyzer.kt110 override fun visitItem(item: Item) { in <lambda>()
111 val annotations = item.modifiers.annotations() in <lambda>()
117 handleAnnotation(annotation, item, depth = 0) in <lambda>()
143 item, in <lambda>()
144 "Found more than one threading annotation on $item; " + in <lambda>()
184 item: Item, in <lambda>()
193 if (item is ClassItem && name == item.qualifiedName()) { in <lambda>()
202 handleInliningDocs(annotation, item) in <lambda>()
205 … "androidx.annotation.RequiresPermission" -> handleRequiresPermission(annotation, item) in <lambda>()
207 "androidx.annotation.FloatRange" -> handleRange(annotation, item) in <lambda>()
[all …]
DComparisonVisitor.kt122 val old = oldTree.item() in compare()
123 val new = newTree.item() in compare()
153 … compare(visitor, oldTree.children, newTree.children, newTree.item(), oldTree.item()) in compare()
162 visitRemoved(visitor, oldList[index1++].item(), newParent) in compare()
169 val new = newTree.item() in compare()
205 compare(visitor, parameters, newTree.children, newTree.item(), inherited) in visitAdded()
215 override fun visitItem(item: Item) { in visitAdded()
216 doVisitAdded(visitor, item) in visitAdded()
225 private fun doVisitAdded(visitor: ComparisonVisitor, item: Item) { in doVisitAdded()
226 visitor.added(item) in doVisitAdded()
[all …]
DApiLint.kt181 private fun report(id: Issue, item: Item, message: String, element: PsiElement? = null) { in <lambda>()
184 if (item.deprecated) { in <lambda>()
189 val testItem = if (item is ParameterItem) item.containingMethod() else item in <lambda>()
194 reporter.report(id, item, message, element) in <lambda>()
243 override fun skip(item: Item): Boolean { in <lambda>()
244 return super.skip(item) || in <lambda>()
245 item is ClassItem && !isInteresting(item) || in <lambda>()
246 item is MethodItem && !isInteresting(item.containingClass()) || in <lambda>()
247 item is FieldItem && !isInteresting(item.containingClass()) in <lambda>()
283 private fun checkType(type: TypeItem, item: Item) { in <lambda>()
[all …]
DAndroidApiChecks.kt40 override fun skip(item: Item): Boolean { in check()
42 if (item is ClassItem) { in check()
43 val name = item.qualifiedName() in check()
46 return super.skip(item) in check()
49 override fun visitItem(item: Item) { in check()
50 checkTodos(item) in check()
83 private fun getDocumentation(item: Item, tag: String?): String { in getDocumentation()
84 return if (item === cachedDocumentationItem && cachedDocumentationTag == tag) { in getDocumentation()
87 cachedDocumentationItem = item in getDocumentation()
89 cachedDocumentation = findDocumentation(item, tag) in getDocumentation()
[all …]
DExtractAnnotations.kt131 for ((item, annotation) in pairs) { in <lambda>() variable
132 if (item != prev) { in <lambda>()
138 writer.print(item.getExternalAnnotationSignature()) in <lambda>()
142 prev = item in <lambda>()
144 writeAnnotation(writer, item, annotation) in <lambda>()
161 private fun addItem(item: Item, annotation: AnnotationHolder) { in <lambda>()
162 val pkg = when (item) { in <lambda>()
163 is MemberItem -> item.containingClass().containingPackage() in <lambda>()
164 is ParameterItem -> item.containingMethod().containingClass().containingPackage() in <lambda>()
174 list.add(Pair(item, annotation)) in <lambda>()
[all …]
DConvertJarsToSignatureFiles.kt76 override fun visitItem(item: Item) { in <lambda>()
77 unmarkRecent(item) in <lambda>()
78 super.visitItem(item) in <lambda>()
201 val item = codebase.findClass(classNode, MATCH_ALL) in <lambda>() constant
202 if (item != null && !item.deprecated) { in <lambda>()
203 item.deprecated = true in <lambda>()
204 progress("Turned deprecation on for $item") in <lambda>()
214 val item = codebase.findMethod(classNode, methodNode, MATCH_ALL) in <lambda>() constant
215 if (item != null && !item.deprecated) { in <lambda>()
216 item.deprecated = true in <lambda>()
[all …]
DApiAnalyzer.kt660 private fun ensureParentVisible(item: Item) { in <lambda>()
661 val parent = item.parent() ?: return in <lambda>()
665 val violatingAnnotation = if (item.modifiers.hasShowAnnotation()) { in <lambda>()
666 item.modifiers.annotations().find { in <lambda>()
669 } else if (item.modifiers.hasShowSingleAnnotation()) { in <lambda>()
670 item.modifiers.annotations().find { in <lambda>()
678 Issues.SHOWING_MEMBER_IN_HIDDEN_CLASS, item, in <lambda>()
781 override fun visitItem(item: Item) { in <lambda>()
782 if (item.deprecated && !item.documentation.contains("@deprecated") && in <lambda>()
786 !item.isKotlin() in <lambda>()
[all …]
DCompatibilityCheck.kt652 private fun handleAdded(issue: Issue, item: Item) { in handleAdded()
653 if (item.originallyHidden) { in handleAdded()
676 val equivalent = findBaseItem(item) in handleAdded()
682 report(issue, item, message) in handleAdded()
685 private fun handleRemoved(issue: Issue, item: Item) { in handleRemoved()
686 if (!item.emit) { in handleRemoved()
704 val baseItem = findBaseItem(item) in handleRemoved()
710 … report(issue, item, "Removed ${if (item.deprecated) "deprecated " else ""}${describe(item)}") in handleRemoved()
714 item: Item in findBaseItem()
718 return when (item) { in findBaseItem()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/parser/
DCompactMemInfoParserTest.java18 import com.android.loganalysis.item.CompactMemInfoItem;
34 CompactMemInfoItem item = new CompactMemInfoParser().parse(input); in testSingleProcLineWithSwapHasActivities() local
36 assertEquals(1, item.getPids().size()); in testSingleProcLineWithSwapHasActivities()
37 assertEquals("com.google.android.youtube1", item.getName(2964)); in testSingleProcLineWithSwapHasActivities()
38 assertEquals(19345, item.getPss(2964)); in testSingleProcLineWithSwapHasActivities()
39 assertEquals(1005, item.getSwap(2964)); in testSingleProcLineWithSwapHasActivities()
40 assertEquals("cached", item.getType(2964)); in testSingleProcLineWithSwapHasActivities()
41 assertEquals(true, item.hasActivities(2964)); in testSingleProcLineWithSwapHasActivities()
47 CompactMemInfoItem item = new CompactMemInfoParser().parse(input); in testSingleProcLineWithoutSwapHasActivities() local
49 assertEquals(1, item.getPids().size()); in testSingleProcLineWithoutSwapHasActivities()
[all …]
DGfxInfoParserTest.java18 import com.android.loganalysis.item.GfxInfoItem;
90 GfxInfoItem item = new GfxInfoParser().parse(input); in testSingleProcess() local
92 assertEquals(1, item.getPids().size()); in testSingleProcess()
93 assertEquals("com.google.android.leanbacklauncher", item.getName(853)); in testSingleProcess()
94 assertEquals(20391, item.getTotalFrames(853)); in testSingleProcess()
95 assertEquals(785, item.getJankyFrames(853)); in testSingleProcess()
96 assertEquals(9, item.getPrecentile90(853)); in testSingleProcess()
97 assertEquals(14, item.getPrecentile95(853)); in testSingleProcess()
98 assertEquals(32, item.getPrecentile99(853)); in testSingleProcess()
285 GfxInfoItem item = new GfxInfoParser().parse(input); in testMultipleProcesses() local
[all …]
DKernelLogParserTest.java18 import com.android.loganalysis.item.KernelLogItem;
19 import com.android.loganalysis.item.LowMemoryKillerItem;
20 import com.android.loganalysis.item.MiscKernelLogItem;
21 import com.android.loganalysis.item.PageAllocationFailureItem;
22 import com.android.loganalysis.item.SELinuxItem;
50 MiscKernelLogItem item = kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).get(0); in testParseLastKmsg() local
51 assertEquals(1.0, item.getEventTime(), 0.0000005); in testParseLastKmsg()
52 assertEquals("[ 0.000000] Start", item.getPreamble()); in testParseLastKmsg()
53 assertEquals("Kernel panic", item.getStack()); in testParseLastKmsg()
72 MiscKernelLogItem item = kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).get(0); in testParseDmesg() local
[all …]
DTopParserTest.java18 import com.android.loganalysis.item.TopItem;
42 TopItem item = new TopParser().parse(inputBlock); in testTopParser() local
44 assertEquals(150, item.getUser()); in testTopParser()
45 assertEquals(50, item.getNice()); in testTopParser()
46 assertEquals(200, item.getSystem()); in testTopParser()
47 assertEquals(510, item.getIdle()); in testTopParser()
48 assertEquals(60, item.getIow()); in testTopParser()
49 assertEquals(5, item.getIrq()); in testTopParser()
50 assertEquals(25, item.getSirq()); in testTopParser()
51 assertEquals(1000, item.getTotal()); in testTopParser()
[all …]
DMemInfoParserTest.java18 import com.android.loganalysis.item.MemInfoItem;
44 MemInfoItem item = new MemInfoParser().parse(inputBlock); in testMemInfoParser() local
46 assertEquals(6, item.size()); in testMemInfoParser()
47 assertEquals((Long)353332l, item.get("MemTotal")); in testMemInfoParser()
48 assertEquals((Long)65420l, item.get("MemFree")); in testMemInfoParser()
49 assertEquals((Long)20800l, item.get("Buffers")); in testMemInfoParser()
50 assertEquals((Long)86204l, item.get("Cached")); in testMemInfoParser()
51 assertEquals((Long)0l, item.get("SwapCached")); in testMemInfoParser()
52 assertEquals((Long)34359640152l, item.get("Long")); in testMemInfoParser()
53 assertNull(item.get("ExtraLongIgnore")); in testMemInfoParser()
[all …]
DLogcatParserTest.java18 import com.android.loganalysis.item.JavaCrashItem;
19 import com.android.loganalysis.item.LogcatItem;
20 import com.android.loganalysis.item.MiscLogcatItem;
376 MiscLogcatItem item = logcat.getMiscEvents(LogcatParser.HIGH_CPU_USAGE).get(0); in testParse_misc_events() local
378 assertEquals(1676, item.getPid().intValue()); in testParse_misc_events()
379 assertEquals(1821, item.getTid().intValue()); in testParse_misc_events()
380 assertEquals(parseTime("2012-04-25 18:33:27.273"), item.getEventTime()); in testParse_misc_events()
382 item = logcat.getMiscEvents(LogcatParser.HIGH_MEMORY_USAGE).get(0); in testParse_misc_events()
384 assertEquals(7813, item.getPid().intValue()); in testParse_misc_events()
385 assertEquals(7813, item.getTid().intValue()); in testParse_misc_events()
[all …]
/tools/loganalysis/src/com/android/loganalysis/parser/
DBugreportParser.java18 import com.android.loganalysis.item.ActivityServiceItem;
19 import com.android.loganalysis.item.AnrItem;
20 import com.android.loganalysis.item.BugreportItem;
21 import com.android.loganalysis.item.BugreportItem.CommandLineItem;
22 import com.android.loganalysis.item.DumpsysItem;
23 import com.android.loganalysis.item.IItem;
24 import com.android.loganalysis.item.KernelLogItem;
25 import com.android.loganalysis.item.LogcatItem;
26 import com.android.loganalysis.item.MemInfoItem;
27 import com.android.loganalysis.item.MiscKernelLogItem;
[all …]
DLogcatParser.java18 import com.android.loganalysis.item.LogcatItem;
19 import com.android.loganalysis.item.MiscLogcatItem;
344 MiscLogcatItem item = null; in commit() local
346 item = new AnrParser().parse(data.mLines); in commit()
371 item = new JavaCrashParser().parse(data.mLines); in commit()
372 if (item != null) { in commit()
373 item.setApp(app); in commit()
374 item.setPid(pid); in commit()
375 item.setCategory(getJavaCrashCategory(data.mLevel, data.mTag)); in commit()
379 item = new NativeCrashParser().parse(data.mLines); in commit()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DItem.kt262 fun describe(item: Item, capitalize: Boolean = false): String { in describe()
263 return when (item) { in describe()
264 is PackageItem -> describe(item, capitalize = capitalize) in describe()
265 is ClassItem -> describe(item, capitalize = capitalize) in describe()
266 is FieldItem -> describe(item, capitalize = capitalize) in describe()
268 item, in describe()
274 item, in describe()
279 else -> item.toString() in describe()
284 item: MethodItem, in describe()
291 if (item.isConstructor()) { in describe()
[all …]
DAnnotationItem.kt160 fun simpleName(item: AnnotationItem): String { in simpleName()
161 val qualifiedName = item.qualifiedName() ?: return "" in simpleName()
587 fun getImplicitNullness(item: Item): Boolean? { in getImplicitNullness()
592 val sourcePsi = item.psi() in getImplicitNullness()
598 if (item is FieldItem && in getImplicitNullness()
599 … (item.isEnumConstant() || item.modifiers.isFinal() && item.initialValue(false) != null) in getImplicitNullness()
603 } else if (item is FieldItem && item.modifiers.isFinal()) { in getImplicitNullness()
609 val initializer = (item.psi() as? PsiField)?.initializer in getImplicitNullness()
629 } else if (item.synthetic && (item is MethodItem && item.isEnumSyntheticMethod() || in getImplicitNullness()
630 item is ParameterItem && item.containingMethod().isEnumSyntheticMethod()) in getImplicitNullness()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/item/
DGenericItemTest.java16 package com.android.loganalysis.item;
161 GenericItem item = new GenericItem(ATTRIBUTES); in testAttributes() local
163 assertNull(item.getAttribute("string")); in testAttributes()
164 assertNull(item.getAttribute("integer")); in testAttributes()
166 item.setAttribute("string", mStringAttribute); in testAttributes()
167 item.setAttribute("integer", mIntegerAttribute); in testAttributes()
169 assertEquals(mStringAttribute, item.getAttribute("string")); in testAttributes()
170 assertEquals(mIntegerAttribute, item.getAttribute("integer")); in testAttributes()
172 item.setAttribute("string", null); in testAttributes()
173 item.setAttribute("integer", null); in testAttributes()
[all …]
DDvmLockSampleItemTest.java16 package com.android.loganalysis.item;
31 DvmLockSampleItem item = new DvmLockSampleItem(); in testToJson() local
33 item.setAttribute(DvmLockSampleItem.PROCESS_NAME, "android.support.test.aupt"); in testToJson()
34 item.setAttribute(DvmLockSampleItem.SENSITIVITY_FLAG, false); in testToJson()
35item.setAttribute(DvmLockSampleItem.WAITING_THREAD_NAME, "Instr: android.support.test.aupt"); in testToJson()
36 item.setAttribute(DvmLockSampleItem.WAIT_TIME, 75); in testToJson()
37 item.setAttribute(DvmLockSampleItem.WAITING_SOURCE_FILE, "AccessibilityCache.java"); in testToJson()
38 item.setAttribute(DvmLockSampleItem.WAITING_SOURCE_LINE, 256); in testToJson()
39 item.setAttribute(DvmLockSampleItem.OWNER_FILE_NAME, "-"); in testToJson()
40 item.setAttribute(DvmLockSampleItem.OWNER_ACQUIRE_SOURCE_LINE, 96); in testToJson()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiClassItem.kt123 val item = codebase.findOrCreateClass(cls) in <lambda>() constant
124 result.add(item) in <lambda>()
424 val item = PsiClassItem( in <lambda>() constant
435 codebase.registerClass(item) in <lambda>()
436 item.modifiers.setOwner(item) in <lambda>()
451 methods.add(PsiConstructorItem.create(codebase, item, psiMethod)) in <lambda>()
460 item, false in <lambda>()
468 val constructor = PsiConstructorItem.create(codebase, item, psiMethod) in <lambda>()
476 val method = PsiMethodItem.create(codebase, item, psiMethod) in <lambda>()
483 … constructors.add(PsiConstructorItem.createDefaultConstructor(codebase, item, psiClass)) in <lambda>()
[all …]
/tools/loganalysis/src/com/android/loganalysis/
DLogAnalyzer.java18 import com.android.loganalysis.item.BugreportItem;
19 import com.android.loganalysis.item.DvmLockSampleItem;
20 import com.android.loganalysis.item.IItem;
21 import com.android.loganalysis.item.KernelLogItem;
22 import com.android.loganalysis.item.LogcatItem;
23 import com.android.loganalysis.item.MemoryHealthItem;
24 import com.android.loganalysis.item.MonkeyLogItem;
145 MemoryHealthItem item = new MemoryHealthParser().parse(reader); in run() local
146 printMemoryHealthLog(item); in run()
155 DvmLockSampleItem item = new DvmLockSampleParser().parse(reader); in run() local
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/
DUnitTests.java19 import com.android.loganalysis.item.BatteryDischargeItemTest;
20 import com.android.loganalysis.item.BatteryUsageItemTest;
21 import com.android.loganalysis.item.DumpsysPackageStatsItemTest;
22 import com.android.loganalysis.item.DvmLockSampleItemTest;
23 import com.android.loganalysis.item.GenericItemTest;
24 import com.android.loganalysis.item.InterruptItemTest;
25 import com.android.loganalysis.item.LocationDumpsItemTest;
26 import com.android.loganalysis.item.MemInfoItemTest;
27 import com.android.loganalysis.item.MonkeyLogItemTest;
28 import com.android.loganalysis.item.ProcrankItemTest;
[all …]
/tools/loganalysis/src/com/android/loganalysis/item/
DKernelLogItem.java16 package com.android.loganalysis.item;
111 for (MiscKernelLogItem item : getEvents()) { in getMiscEvents()
112 if (item.getCategory().equals(category)) { in getMiscEvents()
113 items.add(item); in getMiscEvents()
124 for (MiscKernelLogItem item : getEvents()) { in getSELinuxEvents()
125 if (item instanceof SELinuxItem) { in getSELinuxEvents()
126 items.add((SELinuxItem)item); in getSELinuxEvents()
137 for (MiscKernelLogItem item : getEvents()) { in getLowMemoryKillerEvents()
138 if (item instanceof LowMemoryKillerItem) { in getLowMemoryKillerEvents()
139 items.add((LowMemoryKillerItem)item); in getLowMemoryKillerEvents()
[all …]
DLogcatItem.java16 package com.android.loganalysis.item;
103 for (IItem item : getEvents()) { in getAnrs()
104 if (item instanceof AnrItem) { in getAnrs()
105 anrs.add((AnrItem) item); in getAnrs()
116 for (IItem item : getEvents()) { in getJavaCrashes()
117 if (item instanceof JavaCrashItem) { in getJavaCrashes()
118 jcs.add((JavaCrashItem) item); in getJavaCrashes()
129 for (IItem item : getEvents()) { in getNativeCrashes()
130 if (item instanceof NativeCrashItem) { in getNativeCrashes()
131 ncs.add((NativeCrashItem) item); in getNativeCrashes()
[all …]

1234567891011