diff options
Diffstat (limited to 'tools/aapt2/java/AnnotationProcessor.cpp')
-rw-r--r-- | tools/aapt2/java/AnnotationProcessor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt2/java/AnnotationProcessor.cpp b/tools/aapt2/java/AnnotationProcessor.cpp index c93461a66899..8d91b0098c1f 100644 --- a/tools/aapt2/java/AnnotationProcessor.cpp +++ b/tools/aapt2/java/AnnotationProcessor.cpp @@ -23,6 +23,7 @@ #include "text/Utf8Iterator.h" #include "util/Util.h" +using ::aapt::text::Printer; using ::aapt::text::Utf8Iterator; using ::android::StringPiece; @@ -109,23 +110,22 @@ void AnnotationProcessor::AppendNewLine() { } } -void AnnotationProcessor::WriteToStream(const StringPiece& prefix, std::ostream* out) const { +void AnnotationProcessor::Print(Printer* printer) const { if (has_comments_) { std::string result = comment_.str(); for (StringPiece line : util::Tokenize(result, '\n')) { - *out << prefix << line << "\n"; + printer->Println(line); } - *out << prefix << " */" - << "\n"; + printer->Println(" */"); } if (annotation_bit_mask_ & AnnotationRule::kDeprecated) { - *out << prefix << "@Deprecated\n"; + printer->Println("@Deprecated"); } for (const AnnotationRule& rule : sAnnotationRules) { if (annotation_bit_mask_ & rule.bit_mask) { - *out << prefix << rule.annotation << "\n"; + printer->Println(rule.annotation); } } } |