Home
last modified time | relevance | path

Searched refs:writer (Results 1 – 25 of 79) sorted by relevance

1234

/tools/metalava/metalava/src/main/java/com/android/tools/metalava/
DJDiffXmlWriter.kt47 private val writer: PrintWriter, in <lambda>() constant in com.android.tools.metalava.JDiffXmlWriter
65 writer.print("<api") in <lambda>()
69 writer.print(" name=\"") in <lambda>()
70 writer.print(apiName) in <lambda>()
71 writer.print("\"") in <lambda>()
75 writer.print(" xmlns:metalava=\"http://www.android.com/metalava/\"") in <lambda>()
77 writer.println(">") in <lambda>()
81 writer.println("</api>") in <lambda>()
86 writer.println("<package name=\"${pkg.qualifiedName()}\"\n>") in <lambda>()
90 writer.println("</package>") in <lambda>()
[all …]
DProguardWriter.kt33 private val writer: PrintWriter, constant in com.android.tools.metalava.ProguardWriter
47 writer.print("-keep class ") in visitClass()
48 writer.print(cls.qualifiedNameWithDollarInnerClasses()) in visitClass()
49 writer.print(" {\n") in visitClass()
53 writer.print("}\n") in afterVisitClass()
57 writer.print(" ") in visitConstructor()
58 writer.print("<init>") in visitConstructor()
61 writer.print(";\n") in visitConstructor()
65 writer.print(" ") in visitMethod()
69 writer.write(visibilityLevel.javaSourceCodeModifier + " ") in visitMethod()
[all …]
DDexApiWriter.kt28 private val writer: PrintWriter, constant in com.android.tools.metalava.DexApiWriter
43 writer.print(cls.type().internalName()) in visitClass()
44 writer.print("\n") in visitClass()
53 writer.print(method.containingClass().type().internalName()) in visitMethod()
54 writer.print("->") in visitMethod()
55 writer.print(method.internalName()) in visitMethod()
56 writer.print("(") in visitMethod()
58 writer.print(pi.type().internalName()) in visitMethod()
60 writer.print(")") in visitMethod()
62 writer.print("V") in visitMethod()
[all …]
DExtractAnnotations.kt132 StringPrintWriter.create().use { writer -> in <lambda>() method
133 writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>") in <lambda>()
141 writer.print(" </item>") in <lambda>()
142 writer.println() in <lambda>()
144 writer.print(" <item name=\"") in <lambda>()
145 writer.print(signature) in <lambda>()
146 writer.println("\">") in <lambda>()
151 writeAnnotation(writer, item, annotation) in <lambda>()
154 writer.print(" </item>") in <lambda>()
155 writer.println() in <lambda>()
[all …]
DSignatureWriter.kt37 private val writer: PrintWriter, in <lambda>() constant in com.android.tools.metalava.SignatureWriter
59 writer.print(fileFormat.header()) in <lambda>()
65 writer = writer, in <lambda>()
73 writer.print(fileFormat.header()) in <lambda>()
77 writer.print(text) in <lambda>()
140 writer, in <lambda>()
/tools/metalava/metalava/src/main/java/com/android/tools/metalava/stub/
DJavaStubWriter.kt35 private val writer: PrintWriter, in <lambda>() constant in com.android.tools.metalava.stub.JavaStubWriter
47 writer.println("package $qualifiedName;") in <lambda>()
48 writer.println() in <lambda>()
57 writer.println("import static ${item.pattern};") in <lambda>()
59 writer.println("import ${item.pattern};") in <lambda>()
62 writer.println() in <lambda>()
67 appendDocumentation(cls, writer, config) in <lambda>()
70 writer.println("@SuppressWarnings({\"unchecked\", \"deprecation\", \"all\"})") in <lambda>()
75 cls.isAnnotationType() -> writer.print("@interface") in <lambda>()
76 cls.isInterface() -> writer.print("interface") in <lambda>()
[all …]
DKotlinStubWriter.kt32 private val writer: PrintWriter, in <lambda>() constant in com.android.tools.metalava.stub.KotlinStubWriter
43 writer.println("package $qualifiedName") in <lambda>()
44 writer.println() in <lambda>()
48 writer.println("import ${item.pattern}") in <lambda>()
50 writer.println() in <lambda>()
53 appendDocumentation(cls, writer, config) in <lambda>()
55 writer.println("@file:Suppress(\"ALL\")") in <lambda>()
60 cls.isAnnotationType() -> writer.print("annotation class") in <lambda>()
61 cls.isInterface() -> writer.print("interface") in <lambda>()
62 cls.isEnum() -> writer.print("enum class") in <lambda>()
[all …]
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/
DFieldItem.kt108 writer: PrintWriter, in <lambda>()
119 writer.print(" = ") in <lambda>()
120 writer.print(value) in <lambda>()
121 writer.print("; // 0x") in <lambda>()
122 writer.print(Integer.toHexString(value)) in <lambda>()
125 writer.print(" = ") in <lambda>()
126 writer.print('"') in <lambda>()
127 writer.print(javaEscapeString(value)) in <lambda>()
128 writer.print('"') in <lambda>()
129 writer.print(";") in <lambda>()
[all …]
DModifierListWriter.kt23 private val writer: Writer, in <lambda>() constant in com.android.tools.metalava.model.ModifierListWriter
35 writer: Writer, in <lambda>()
39 writer = writer, in <lambda>()
45 writer: Writer, in <lambda>()
51 writer = writer, in <lambda>()
131 writer.write("$modifier ") in <lambda>()
150 writer.write("abstract ") in <lambda>()
154 writer.write("default ") in <lambda>()
158 writer.write("static ") in <lambda>()
173 writer.write("final ") in <lambda>()
[all …]
/tools/netsim/src/frontend/
Dfrontend_server.cc90 CxxServerResponseWritable writer; in ListDevice() local
91 HandleDeviceCxx(writer, "GET", "", ""); in ListDevice()
92 if (writer.is_ok) { in ListDevice()
93 google::protobuf::util::JsonStringToMessage(writer.body, reply); in ListDevice()
96 return grpc::Status(grpc::StatusCode::UNKNOWN, writer.err); in ListDevice()
102 CxxServerResponseWritable writer; in CreateDevice() local
105 HandleDeviceCxx(writer, "POST", "", request_json); in CreateDevice()
106 if (writer.is_ok) { in CreateDevice()
107 google::protobuf::util::JsonStringToMessage(writer.body, response); in CreateDevice()
110 return grpc::Status(grpc::StatusCode::UNKNOWN, writer.err); in CreateDevice()
[all …]
/tools/test/connectivity/acts/framework/tests/libs/testtracker/
Dtesttracker_results_writer_test.py68 writer = TestTrackerResultsWriter(MOCK_LOG_PATH, MOCK_PROPERTIES)
69 writer._add_property(self.mock_proto, 'bool_prop', False)
76 writer = TestTrackerResultsWriter(MOCK_LOG_PATH, MOCK_PROPERTIES)
77 writer._add_property(self.mock_proto, 'int_prop', 5)
84 writer = TestTrackerResultsWriter(MOCK_LOG_PATH, MOCK_PROPERTIES)
85 writer._add_property(self.mock_proto, 'float_prop', 7.4)
92 writer = TestTrackerResultsWriter(MOCK_LOG_PATH, MOCK_PROPERTIES)
93 writer._add_property(self.mock_proto, 'str_prop', 'ok')
100 writer = TestTrackerResultsWriter(MOCK_LOG_PATH, MOCK_PROPERTIES)
101 result = writer._create_result_proto(self.mock_record)
[all …]
/tools/platform-compat/javatest/android/processor/compat/changeid/
DXmlWriterTest.java36 XmlWriter writer = new XmlWriter(); in testNoChanges() local
37 writer.write(mOutputStream); in testNoChanges()
46 XmlWriter writer = new XmlWriter(); in testOneChange() local
52 writer.addChange(c); in testOneChange()
53 writer.write(mOutputStream); in testOneChange()
64 XmlWriter writer = new XmlWriter(); in testSomeChanges() local
98 writer.addChange(c); in testSomeChanges()
99 writer.addChange(disabled); in testSomeChanges()
100 writer.addChange(sdkRestricted); in testSomeChanges()
101 writer.addChange(both); in testSomeChanges()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/
DShowmapPullerMetricCollectorTest.java80 FileWriter writer = new FileWriter(mTmpFile); in test16ColumnHeaders() local
99 writer.write(log); in test16ColumnHeaders()
100 writer.close(); in test16ColumnHeaders()
131 FileWriter writer = new FileWriter(mTmpFile); in test17ColumnHeaders() local
150 writer.write(log); in test17ColumnHeaders()
151 writer.close(); in test17ColumnHeaders()
181 FileWriter writer = new FileWriter(mTmpFile); in testOneObjectTwiceFlow() local
197 writer.write(log); in testOneObjectTwiceFlow()
198 writer.close(); in testOneObjectTwiceFlow()
226 FileWriter writer = new FileWriter(mTmpFile); in testTwoObjectOnceFlow() local
[all …]
/tools/netsim/rust/daemon/src/http_server/
Dhttp_router.rs46 pub fn handle_request(&self, request: &Request<Vec<u8>>, writer: ResponseWritable) { in handle_request()
52 handler(request, param, writer); in handle_request()
57 writer.put_error(404, body.as_str()); in handle_request()
103 fn handle_index(_request: &Request<Vec<u8>>, _param: &str, writer: ResponseWritable) { in handle_index()
104 writer.put_ok_with_vec("text/html", b"Hello, world!".to_vec(), vec![]); in handle_index()
107 fn handle_user(_request: &Request<Vec<u8>>, user_id: &str, writer: ResponseWritable) { in handle_user()
109 writer.put_ok("application/json", body.as_str(), vec![]); in handle_user()
112 fn handle_query(request: &Request<Vec<u8>>, _param: &str, writer: ResponseWritable) { in handle_query()
114 writer.put_ok("text/plain", body.as_str(), vec![]); in handle_query()
144 let mut writer = ServerResponseWriter::new(&mut stream); in test_handle_request() localVariable
[all …]
Dserver_response.rs48 writer: &'a mut dyn Write, field
53 pub fn new<W: Write>(writer: &mut W) -> ServerResponseWriter { in new()
54 ServerResponseWriter { writer, response: None } in new()
71 if let Err(e) = self.writer.write_all(&buffer) { in put_response()
100 if let Err(e) = self.writer.write_all(chunk) { in put_chunk()
103 self.writer.flush().unwrap(); in put_chunk()
165 let mut writer = ServerResponseWriter::new(&mut stream); in test_put_error() localVariable
166 writer.put_error(404, "Hello World"); in test_put_error()
176 let mut writer = ServerResponseWriter::new(&mut stream); in test_put_ok() localVariable
177 writer.put_ok("text/plain", "Hello World", vec![]); in test_put_ok()
[all …]
Dhttp_handlers.rs106 fn handle_file(method: &str, path: &str, writer: ResponseWritable) { in handle_file()
113 writer.put_ok_with_vec(to_content_type(&filepath), body, vec![]); in handle_file()
118 writer.put_error(404, body.as_str()); in handle_file()
122 fn handle_index(request: &Request<Vec<u8>>, _param: &str, writer: ResponseWritable) { in handle_index()
123 handle_file(request.method().as_str(), "index.html", writer) in handle_index()
126 fn handle_static(request: &Request<Vec<u8>>, path: &str, writer: ResponseWritable) { in handle_static()
128 handle_file(request.method().as_str(), path, writer) in handle_static()
131 fn handle_version(_request: &Request<Vec<u8>>, _param: &str, writer: ResponseWritable) { in handle_version()
133 writer.put_ok("text/plain", body.as_str(), vec![]); in handle_version()
136 fn handle_dev(request: &Request<Vec<u8>>, _param: &str, writer: ResponseWritable) { in handle_dev()
[all …]
/tools/netsim/rust/daemon/src/captures/
Dcaptures_handler.rs79 fn handle_capture_get(writer: ResponseWritable, id: ChipIdentifier) -> anyhow::Result<()> { in handle_capture_get()
107 writer.put_ok_with_length( in handle_capture_get()
117 writer.put_chunk(&buffer[..length]); in handle_capture_get()
123 fn handle_capture_list(writer: ResponseWritable) -> anyhow::Result<()> { in handle_capture_list()
137 writer.put_ok("text/json", &json_response, vec![]); in handle_capture_list()
144 writer: ResponseWritable, in handle_capture_patch()
163 writer.put_ok("text/json", &json_response, vec![]); in handle_capture_patch()
169 pub fn handle_capture(request: &Request<Vec<u8>>, param: &str, writer: ResponseWritable) { in handle_capture()
170 if let Err(e) = handle_capture_internal(request, param, writer) { in handle_capture()
171 writer.put_error(404, &e.to_string()); in handle_capture()
[all …]
/tools/asuite/atest/coverage/com/android/jacocolcov/
DJacocoToLcovConverter.java218 try (BufferedWriter writer = Files.newBufferedWriter(outputFile, StandardCharsets.UTF_8)) { in write() argument
221 writeLine(writer, "TN:%s", outputFile.getFileName()); in write()
247 writeLine(writer, "SF:%s", sourcefile); in write()
251 writeLine(writer, "FN:%d,%s", method.getFirstLine(), name(method)); in write()
257 writeLine(writer, "FNDA:%d,%s", count, name(method)); in write()
266 writeLine(writer, "FNF:%d", methodsFound); in write()
267 writeLine(writer, "FNH:%d", methodsHit); in write()
286 writeLine(writer, "DA:%d,%d", i, count); in write()
296 writeLine(writer, "LH:%d", linesHit); in write()
297 writeLine(writer, "LF:%d", linesFound); in write()
[all …]
/tools/tradefederation/contrib/src/com/android/media/tests/
DCameraTestBase.java305 BufferedWriter writer = new BufferedWriter(new FileWriter(mOutputFile, false)); in createOutputFile() local
306 writer.write(LOG_HEADER); in createOutputFile()
307 writer.newLine(); in createOutputFile()
308 writer.flush(); in createOutputFile()
309 writer.close(); in createOutputFile()
345 BufferedWriter writer = null; in printMeminfo() local
349 writer = new BufferedWriter(new FileWriter(outputFile, true)); in printMeminfo()
375 writer.write(printMsg); in printMeminfo()
376 writer.newLine(); in printMeminfo()
377 writer.flush(); in printMeminfo()
[all …]
/tools/asuite/atest/
Dbazel_mode.py770 writer = IndentWriter(f)
772 writer.write_line(
963 writer = IndentWriter(f)
964 build_file_writer = BuildFileWriter(writer)
966 writer.write_line('filegroup(')
968 with writer.indent():
974 writer.write_line(')')
1103 writer = IndentWriter(f)
1104 build_file_writer = BuildFileWriter(writer)
1106 writer.write_line(f'{self._rule_name}(')
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/
DTableFormatter.java46 public void displayTable(List<List<String>> table, PrintWriter writer) { in displayTable() argument
54 writer.append(rowData.get(col)); in displayTable()
56 insertPadding(numPaddingChars, writer); in displayTable()
58 writer.println(); in displayTable()
62 private void insertPadding(int numChars, PrintWriter writer) { in insertPadding() argument
64 writer.append(' '); in insertPadding()
/tools/netsim/rust/daemon/src/devices/
Ddevices_handler.rs592 fn handle_device_create(writer: ResponseWritable, create_json: &str) { in handle_device_create()
610 Ok(response) => writer.put_ok("text/json", &response, vec![]), in handle_device_create()
611 Err(err) => writer.put_error(404, err.as_str()), in handle_device_create()
616 fn handle_device_patch(writer: ResponseWritable, id: Option<DeviceIdentifier>, patch_json: &str) { in handle_device_patch()
618 Ok(()) => writer.put_ok("text/plain", "Device Patch Success", vec![]), in handle_device_patch()
619 Err(err) => writer.put_error(404, err.as_str()), in handle_device_patch()
623 fn handle_chip_delete(writer: ResponseWritable, delete_json: &str) { in handle_chip_delete()
625 Ok(()) => writer.put_ok("text/plain", "Chip Delete Success", vec![]), in handle_chip_delete()
626 Err(err) => writer.put_error(404, err.as_str()), in handle_chip_delete()
651 fn handle_device_list(writer: ResponseWritable) { in handle_device_list()
[all …]
/tools/metalava/metalava-reporter/src/main/java/com/android/tools/metalava/reporter/
DBaseline.kt231 fun dumpStats(writer: PrintWriter) { in <lambda>()
239 writer.println("Baseline issue type counts for $description baseline:") in <lambda>()
240 writer.println( in <lambda>()
252 writer.println( in <lambda>()
257 writer.println( in <lambda>()
262 writer.println() in <lambda>()
/tools/tradefederation/core/javatests/com/android/tradefed/util/
DTableFormatterTest.java66 PrintWriter writer = new PrintWriter(outStream); in doDisplayTable() local
67 new TableFormatter().displayTable(testData, writer); in doDisplayTable()
68 writer.flush(); in doDisplayTable()
69 writer.close(); in doDisplayTable()
/tools/netsim/rust/daemon/src/transport/
Dwebsocket.rs44 pub fn handle_websocket(request: &Request<Vec<u8>>, param: &str, writer: ResponseWritable) { in handle_websocket()
46 writer.put_error(404, "netsim websocket currently supports bt, uri=/v1/websocket/bt"); in handle_websocket()
52 writer.put_error( in handle_websocket()
60 writer.put_error(404, "Missing Sec-Websocket-Key in header"); in handle_websocket()
64 writer.put_ok_switch_protocol( in handle_websocket()

1234