Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 201) sorted by relevance

123456789

/tools/metalava/src/test/java/com/android/tools/metalava/
DApiFromTextTest.kt26 val source = """ in Loading a signature file and writing the API back out() constant
40 signatureSource = source, in Loading a signature file and writing the API back out()
41 api = source in Loading a signature file and writing the API back out()
47 val source = """ in Handle lambdas as default values() constant
61 signatureSource = source, in Handle lambdas as default values()
63 api = source in Handle lambdas as default values()
69 val source = """ in Invoking function with multiple parameters as parameter default value() constant
82 signatureSource = source, in Invoking function with multiple parameters as parameter default value()
84 api = source in Invoking function with multiple parameters as parameter default value()
90 val source = """ in Handle enum constants as default values() constant
[all …]
DJDiffXmlTest.kt164 val source = """ in Test generics, superclasses and interfaces() constant
195 signatureSource = source, in Test generics, superclasses and interfaces()
378 val source = """ in Test enums() constant
392 signatureSource = source, in Test enums()
483 val source = """ in Test enums compat mode() constant
497 signatureSource = source, in Test enums compat mode()
796 fun `Half float short from source`() { in Half float short from source()
/tools/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsTest.kt51 @Language("JAVA") source: String, in <lambda>()
66 stubs = arrayOf(source), in <lambda>()
115 source = """ in <lambda>()
224 source = """ in <lambda>()
250 source = """ in <lambda>()
275 source = """ in <lambda>()
301 source = """ in <lambda>()
333 source = """ in <lambda>()
368 source = in <lambda>()
414 source = """ in <lambda>()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DOptionCopierTest.java136 OptionSource source = new OptionSource(); in testCopyOptions_string() local
138 OptionCopier.copyOptions(source, dest); in testCopyOptions_string()
139 assertEquals(source.mMyOption, dest.mDestOption); in testCopyOptions_string()
145 OptionSource source = new OptionSource(); in testCopyOptions_int() local
147 OptionCopier.copyOptions(source, dest); in testCopyOptions_int()
148 assertEquals(source.mMyIntOption, dest.mDestIntOption); in testCopyOptions_int()
154 OptionSource source = new OptionSource(); in testCopyOptions_collection() local
155 source.mStringCollection.add("foo"); in testCopyOptions_collection()
158 OptionCopier.copyOptions(source, dest); in testCopyOptions_collection()
167 OptionSource source = new OptionSource(); in testCopyOptions_enum() local
[all …]
/tools/platform-compat/javatest/android/processor/compat/changeid/
DChangeIdProcessorTest.java88 JavaFileObject[] source = { in testCompatConfigXmlOutput() local
121 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput()
129 JavaFileObject[] source = { in testCompatConfigXmlOutput_multiplePackages() local
169 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_multiplePackages()
180 JavaFileObject[] source = { in testCompatConfigXmlOutput_innerClass() local
206 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_innerClass()
214 JavaFileObject[] source = { in testCompatConfigXmlOutput_interface() local
238 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_interface()
246 JavaFileObject[] source = { in testCompatConfigXmlOutput_enum() local
271 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_enum()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtilsLite.java277 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
284 int capacity = source.capacity(); in sliceFromTo()
285 if (end > source.capacity()) { in sliceFromTo()
288 int originalLimit = source.limit(); in sliceFromTo()
289 int originalPosition = source.position(); in sliceFromTo()
291 source.position(0); in sliceFromTo()
292 source.limit(end); in sliceFromTo()
293 source.position(start); in sliceFromTo()
294 ByteBuffer result = source.slice(); in sliceFromTo()
295 result.order(source.order()); in sliceFromTo()
[all …]
DAndroidBinXmlParser.java792 private static ByteBuffer sliceFromTo(ByteBuffer source, long start, long end) { in sliceFromTo() argument
799 int capacity = source.capacity(); in sliceFromTo()
800 if (end > source.capacity()) { in sliceFromTo()
803 return sliceFromTo(source, (int) start, (int) end); in sliceFromTo()
812 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
819 int capacity = source.capacity(); in sliceFromTo()
820 if (end > source.capacity()) { in sliceFromTo()
823 int originalLimit = source.limit(); in sliceFromTo()
824 int originalPosition = source.position(); in sliceFromTo()
826 source.position(0); in sliceFromTo()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DAnnotationItem.kt521 fun shortenAnnotation(source: String): String { in shortenAnnotation()
523 source == "@java.lang.Deprecated" -> "@Deprecated" in shortenAnnotation()
524 source.startsWith("android.annotation.", 1) -> { in shortenAnnotation()
525 "@" + source.substring("@android.annotation.".length) in shortenAnnotation()
527 source.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX, 1) -> { in shortenAnnotation()
528 "@" + source.substring("@android.support.annotation.".length) in shortenAnnotation()
530 source.startsWith(ANDROIDX_ANNOTATION_PREFIX, 1) -> { in shortenAnnotation()
531 "@" + source.substring("@androidx.annotation.".length) in shortenAnnotation()
533 else -> source in shortenAnnotation()
541 fun unshortenAnnotation(source: String): String { in unshortenAnnotation()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1DerEncoder.java502 public static byte[] toDer(Object source, Asn1Type targetType, Asn1Type targetElementType) in toDer() argument
504 Class<?> sourceType = source.getClass(); in toDer()
506 ByteBuffer buf = ((Asn1OpaqueObject) source).getEncoded(); in toDer()
513 return encode(source); in toDer()
520 if (source instanceof ByteBuffer) { in toDer()
521 ByteBuffer buf = (ByteBuffer) source; in toDer()
524 } else if (source instanceof byte[]) { in toDer()
525 value = (byte[]) source; in toDer()
536 if (source instanceof Integer) { in toDer()
537 return toInteger((Integer) source); in toDer()
[all …]
/tools/metalava/src/main/java/com/android/tools/lint/checks/infrastructure/
DClassName.kt24 class ClassName(source: String) {
29 val withoutComments = stripComments(source)
42 fun stripComments(source: String, stripLineComments: Boolean = true): String { in packageNameWithDefault()
43 val sb = StringBuilder(source.length) in packageNameWithDefault()
54 for (i in 0 until source.length) { in packageNameWithDefault()
55 val c = source[i] in packageNameWithDefault()
135 fun getPackage(source: String): String? { in getPackage()
136 val matcher = PACKAGE_PATTERN.matcher(source) in getPackage()
144 fun getClassName(source: String): String? { in getClassName()
145 val matcher = CLASS_PATTERN.matcher(source.replace('\n', ' ')) in getClassName()
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/model/psi/
DJavadocTest.kt27 @Language("JAVA") source: String, in checkStubs()
41 stubs = arrayOf(source), in checkStubs()
146 source = """ in Relative documentation links in stubs()
245 source = """ in Rewrite relative documentation links in doc-stubs()
337 source = """ in Rewrite relative documentation links in doc-stubs 2()
408 source = """ in Rewrite relative documentation links in doc-stubs 3()
505 source = """ in Rewrite relative documentation links in doc-stubs 4()
579 source = """ in Rewrite relative documentation links in doc-stubs 5()
663 source = """ in Check references to inherited field constants()
720 source = """ in Handle @attr references()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DStreamUtilTest.java43 try (final InputStreamSource source = new ByteArrayInputStreamSource(contentBytes)) { in testGetByteArrayListFromSource() argument
44 final InputStream stream = source.createInputStream(); in testGetByteArrayListFromSource()
78 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource() argument
79 final InputStream stream = source.createInputStream(); in testGetStringFromSource()
92 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream() argument
93 output = StreamUtil.getBufferedReaderFromStreamSrc(source); in testGetBufferedReaderFromInputStream()
108 final InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes()); in testCountLinesFromSource() local
109 assertEquals(3, StreamUtil.countLinesFromSource(source)); in testCountLinesFromSource()
141 final String source = getLargeText(); in testCalculateCrc32() local
143 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateCrc32()
[all …]
/tools/trebuchet/trebuchet/traceutils/src/
DTraceUtils.kt27 fun validateSrcDest(source: File, destDir: File) { in <lambda>()
28 if (!source.exists()) { in <lambda>()
29 throw IllegalArgumentException("No such file '$source'") in <lambda>()
73 var next = reader.source.next() in copy()
76 next = reader.source.next() in copy()
80 fun extract(source: File, destDir: File) { in extract()
81 validateSrcDest(source, destDir) in extract()
84 findTraces(InputStreamAdapter(source), onlyKnownFormats = false) { in extract()
101 val source = File(args[0]) in main() constant
103 extract(source, destDir) in main()
/tools/tradefederation/core/common_util/com/android/tradefed/config/
DOptionDef.java29 public final String source; field in OptionDef
32 public OptionDef(String optionName, String optionValue, String source) { in OptionDef() argument
33 this(optionName, null, optionValue, source, null); in OptionDef()
36 public OptionDef(String optionName, String optionKey, String optionValue, String source) { in OptionDef() argument
37 this(optionName, optionKey, optionValue, source, null); in OptionDef()
41 String optionName, String optionKey, String optionValue, String source, String type) { in OptionDef() argument
45 this.source = source; in OptionDef()
/tools/repohooks/rh/
Dconfig.py100 def __init__(self, config=None, source=None): argument
109 self.source = source
184 (self.source, bad_sections))
190 (self.source, hook))
199 (self.source, bad_hooks))
209 (self.source, bad_hooks))
217 '%s' % (self.source, hook, e))
225 (self.source, hook, e))
234 (self.source, bad_tools))
242 (self.source, bad_options))
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/
Dassembly_line_test.py99 builder.source(first_source)
102 builder.source(second_source)
112 builder.source(dummy_source, input_stream=input_stream)
121 builder.source(dummy_source)
130 return_value = builder.source(mock.Mock())
149 builder.source(dummy_transformer).build()
161 builder.source(dummy_source)
173 builder.source(dummy_source)
183 builder.source(mock.Mock())
192 builder.source(mock.Mock()).build()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DStoredEntry.java194 private ProcessedAndRawByteSources source; field in StoredEntry
215 @Nullable ProcessedAndRawByteSources source) in StoredEntry() argument
232 source == null, in StoredEntry()
240 this.source = createSourceFromZip(cdh.getOffset()); in StoredEntry()
248 source, in StoredEntry()
250 this.source = source; in StoredEntry()
261 this.source.getProcessedByteSource().isEmpty(), in StoredEntry()
334 return source.getProcessedByteSource().openStream(); in open()
402 source.close(); in delete()
625 ProcessedAndRawByteSources oldSource = source; in replaceSourceFromZip()
[all …]
DCompressionResult.java37 private final CloseableByteSource source; field in CompressionResult
51 public CompressionResult(@Nonnull CloseableByteSource source, @Nonnull CompressionMethod method, in CompressionResult() argument
54 this.source = source; in CompressionResult()
75 return source; in getSource()
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextBackedAnnotationItem.kt28 source: String,
37 val index = source.indexOf("(")
39 source.substring(1) // Strip @
40 else source.substring(1, index)
47 else -> "@" + qualifiedName + source.substring(index)
54 source.substring(index + 1, source.lastIndexOf(')'))
DTextModifiers.kt54 annotationSources.forEach { source -> in <lambda>() method
55 val index = source.indexOf('(') in <lambda>()
56 val originalName = if (index == -1) source.substring(1) else source.substring(1, index) in <lambda>()
68 … DefaultAnnotationAttribute.createList(source.substring(index + 1, source.lastIndexOf(')'))) in <lambda>()
75 … override fun toSource(target: AnnotationTarget, showDefaultAttrs: Boolean): String = source in <lambda>()
/tools/acloud/
Dsetup.py45 def GenerateProto(source): argument
56 output = source.replace(".proto", "_pb2.py")
59 os.path.exists(source) and
60 os.path.getmtime(source) > os.path.getmtime(output)):
63 if not os.path.exists(source):
64 sys.stderr.write("Can't find required file: %s\n" % source)
74 protoc_command = [PROTOC, "-I%s" % ACLOUD_DIR, "--python_out=.", source]
/tools/loganalysis/tests/src/com/android/loganalysis/util/config/
DArgsOptionParserTest.java268 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_alias() local
269 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_alias()
271 assertNull(source.mOption); in testNonGlobalOptionSource_alias()
273 assertTrue(source.mOption); in testNonGlobalOptionSource_alias()
275 assertFalse(source.mOption); in testNonGlobalOptionSource_alias()
282 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_className() local
283 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_className()
285 assertNull(source.mOption); in testNonGlobalOptionSource_className()
286 parser.parse(new String[] {String.format("--%s:option", source.getClass().getName())}); in testNonGlobalOptionSource_className()
287 assertTrue(source.mOption); in testNonGlobalOptionSource_className()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/
DRewriteAnnotations.kt51 fun modifyAnnotationSources(codebase: Codebase?, source: File, target: File, pkg: String = "") { in <lambda>()
52 val fileName = source.name in <lambda>()
65 source.readText(UTF_8).replace( in <lambda>()
70 } else if (source.isDirectory) { in <lambda>()
72 source.listFiles()?.forEach { in <lambda>()
79 fun copyAnnotations(codebase: Codebase, source: File, target: File, pkg: String = "") { in <lambda>()
80 val fileName = source.name in <lambda>()
92 source.copyTo(target) in <lambda>()
93 } else if (source.isDirectory) { in <lambda>()
95 source.listFiles()?.forEach { in <lambda>()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DDebugHostLogOnFailureCollector.java41 try (InputStreamSource source = getLogger().getLog()) { in onTestRunStart() argument
42 if (source == null) { in onTestRunStart()
48 offset = source.size(); in onTestRunStart()
57 try (InputStreamSource source = getLogger().getLog()) { in onTestFail() argument
58 if (source == null) { in onTestFail()
61 try (InputStream stream = source.createInputStream()) { in onTestFail()
/tools/test/connectivity/acts/framework/acts/test_utils/power/
DPowerGnssBaseTest.py95 source = ColumnDataSource(
113 source=s2, columns=columns, width=1300, height=60, editable=True)
129 plot.line('x0', 'y0', source=source, line_width=2)
130 plot.circle('x0', 'y0', source=source, size=0.5, fill_color='color')
137 source.callback = CustomJS(

123456789