aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-11-06 19:49:16 +0100
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-11-06 20:20:32 +0100
commit67c84b1036ad02ba2384fa75fb28e779a488f3d4 (patch)
treec70665241fab2a4947f0941659b8e6421eabb44c /src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java
parent11517396816697ad1c48a71e47f37d9206225741 (diff)
Break dependency on vfs from the interface of syntax and cmdline.
These libs are exposed externally, implying that the vfs is also exposed externally. We break out PathFragment from vfs to still use this in their interface. This class is a much smaller dependency than the entire vfs. PiperOrigin-RevId: 174729373
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java
index 6d430ff4ab..b61da9b418 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java
@@ -19,7 +19,7 @@ package com.google.devtools.build.lib.skylarkinterface;
*
* <p>This is used for extending the Skylark interpreter with domain-specific values.
*/
-public interface SkylarkValue {
+public interface SkylarkValue extends SkylarkPrintable {
/**
* Returns if the value is immutable and thus suitable for being used as a dictionary key.
@@ -30,24 +30,4 @@ public interface SkylarkValue {
default boolean isImmutable() {
return false;
}
-
- /**
- * Print an official representation of object x.
- *
- * <p>For regular data structures, the value should be parsable back into an equal data structure.
- *
- * @param printer a printer to be used for formatting nested values.
- */
- void repr(SkylarkPrinter printer);
-
- /**
- * Print an informal, human-readable representation of the value.
- *
- * <p>By default dispatches to the {@code repr} method.
- *
- * @param printer a printer to be used for formatting nested values.
- */
- default void str(SkylarkPrinter printer) {
- repr(printer);
- }
}