diff options
author | Googler <noreply@google.com> | 2016-06-30 15:26:23 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2016-07-01 07:09:30 +0000 |
commit | 7128b02078eab0904624c2f970adaa082eb08984 (patch) | |
tree | ae71256bba959735c09ec9b74358f38607fa1f3e /src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java | |
parent | 7f60883548753a8c290ad484cf26605a61edaaea (diff) |
Fixes the case where an optional attribute needs to be an empty string. This is necessary for <style parent="">.
The previous code omitted empty strings to avoid the <attr format=""> case which is an error for aapt.
--
MOS_MIGRATED_REVID=126305040
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java')
-rw-r--r-- | src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java b/src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java index 2aa469dc8a..c55ee3629e 100644 --- a/src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java +++ b/src/tools/android/java/com/google/devtools/build/android/AndroidDataWritingVisitor.java @@ -160,7 +160,15 @@ public interface AndroidDataWritingVisitor extends Flushable { interface Attribute { /** Sets the attribute value. */ StartTag setTo(String value); - /** Sets the attributes values to {@linkplain FullyQualifiedName#name()}. */ + /** Sets the attribute value to {@linkplain FullyQualifiedName#name()}. */ StartTag setTo(FullyQualifiedName fqn); + /** Start the process of setting an attribute value from an iterable of strings. * */ + ValueJoiner setFrom(Iterable<String> values); + } + + /** Represents the concatenation step of turning an {@link Iterable} into a string. */ + @CheckReturnValue + interface ValueJoiner { + StartTag joinedBy(String separator); } } |