aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/DataResource.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-05-09 15:52:27 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-05-10 07:55:57 +0000
commit925fd546efd612bdaab7187404f15a2771fff46d (patch)
treea58f3ba20c39b4268a027ace6f8d0b1598c29035 /src/tools/android/java/com/google/devtools/build/android/DataResource.java
parentec2657fbbc0a360ef52cef2496e25cdf967aaf92 (diff)
4.99 of 5: Fix styleable combining.
Changes non-overwriting resources (id and styleable) to combine on duplication. This change ignores the issue of multiple sources, which will be addressed in a later cl. -- MOS_MIGRATED_REVID=121840285
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/DataResource.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/DataResource.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/DataResource.java b/src/tools/android/java/com/google/devtools/build/android/DataResource.java
index 343c0a9222..44d4a9578c 100644
--- a/src/tools/android/java/com/google/devtools/build/android/DataResource.java
+++ b/src/tools/android/java/com/google/devtools/build/android/DataResource.java
@@ -26,4 +26,13 @@ public interface DataResource extends DataValue {
*/
void writeResource(FullyQualifiedName key, AndroidDataWritingVisitor mergedDataWriter)
throws IOException, MergingException;
+
+ /**
+ * Combines these resource together and returns a single resource.
+ *
+ * @param resource Another resource to be combined with this one.
+ * @return A union of the values of these two resources.
+ * @throws IllegalArgumentException if either resource cannot combine with the other.
+ */
+ DataResource combineWith(DataResource resource);
}