aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-07-22 16:33:17 +0000
committerGravatar John Cater <jcater@google.com>2016-07-22 20:11:12 +0000
commitb6a650936b83b12c9efb9014faa403b94a3b5625 (patch)
tree0ad460ce12ffc2650d436ac9651e8ac26eb43e4c /src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
parent238bf4e778a39df24ebebf8be79e205d7a65e1e4 (diff)
Add a resource merger state -> R class writer.
Collects the R class fields from the new merger's internal state, and then writes out either an R.java or R.class. TBD which to use. One concern is that users may want the javadoc. If so, perhaps this could generate the R.class, and then aapt could generate the srcjar off of the build critical path. Refactor the RClassGenerator to make it easier to use from merger state (vs from R.txt). -- MOS_MIGRATED_REVID=128181306
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java b/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
index 0eb91be1f5..88be7e528c 100644
--- a/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
+++ b/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
@@ -42,4 +42,16 @@ public interface XmlResourceValue {
* @throws IllegalArgumentException if either value cannot combine with the other.
*/
XmlResourceValue combineWith(XmlResourceValue value);
+
+ /**
+ * Queue up writing the resource to the given {@link AndroidResourceClassWriter}.
+ * Each resource can generate one or more (in the case of styleable) fields and inner classes
+ * in the R class.
+ *
+ * @param key The FullyQualifiedName of the resource
+ * @param resourceClassWriter the R java class writer
+ */
+ void writeResourceToClass(
+ FullyQualifiedName key,
+ AndroidResourceClassWriter resourceClassWriter);
}