aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/DataValue.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-03-29 15:49:59 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-03-30 08:12:19 +0000
commit702e5301366ed4a7804d2510e1313e92a0476536 (patch)
treee719058a45ead2bd9ec44c7b6d9844fe2fda3b71 /src/tools/android/java/com/google/devtools/build/android/DataValue.java
parent020a08bd60a1955c746dc6cb7b12d962150d02c8 (diff)
3.73 of 5: Convert xml parsing to use the map based storage
Introduces two new interfaces: DataValue, which compliments DataKey and allows a cleaner interface MergeConflict AndroidDataSet.KeyValueConsumer, abstraction that allows a common interface for consuming parsed resources, which is a lot cleanr for DataValue as well. -- MOS_MIGRATED_REVID=118466739
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/DataValue.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/DataValue.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/DataValue.java b/src/tools/android/java/com/google/devtools/build/android/DataValue.java
new file mode 100644
index 0000000000..7598ab9390
--- /dev/null
+++ b/src/tools/android/java/com/google/devtools/build/android/DataValue.java
@@ -0,0 +1,35 @@
+// Copyright 2016 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.android;
+
+import java.nio.file.Path;
+
+/**
+ * Represents the value associated with DataKey interface for resource and asset values.
+ *
+ * A DataValue is either an android resource or asset derived from a Path.
+ */
+public interface DataValue {
+
+ /**
+ * Provides the DataKey of this value.
+ */
+ DataKey dataKey();
+
+ /**
+ * Provides the Path to the file from which the DataValue was derived.
+ */
+ Path source();
+
+}