diff options
author | Googler <noreply@google.com> | 2017-08-17 05:21:54 +0200 |
---|---|---|
committer | Irina Iancu <elenairina@google.com> | 2017-08-17 09:54:41 +0200 |
commit | 5e65c9828f424b6b0214b984b5d38c9cfc1c746f (patch) | |
tree | 5ba2cc80a387bf84deddc237a1f8d6264f45b4ae /src/main/java/com/google/devtools/build/lib/cmdline | |
parent | 428f4af39d24dd13ee087112be7858c153cb18a3 (diff) |
Change WalkableGraphFactory#prepareAndGet to take multiple SkyKeys as graph roots
It also changes a few accessors of utility methods in Skyframe library. It
refactors the QueryExpressionMapper to use a general QueryExpressionVisitor.
RELNOTES: None
PiperOrigin-RevId: 165534908
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/cmdline')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java index 43f77c8089..92a6dbb1e5 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java +++ b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java @@ -293,6 +293,11 @@ public abstract class TargetPattern implements Serializable { throw new IllegalStateException(); } + /** For patterns of type {@link Type#SINGLE_TARGET}, returns the target path. */ + public String getSingleTargetPath() { + throw new IllegalStateException(); + } + /** * For patterns of type {@link Type#SINGLE_TARGET} and {@link Type#TARGETS_IN_PACKAGE}, returns * the {@link PackageIdentifier} corresponding to the package that would contain the target(s) @@ -349,6 +354,11 @@ public abstract class TargetPattern implements Serializable { } @Override + public String getSingleTargetPath() { + return targetName; + } + + @Override public boolean equals(Object o) { if (this == o) { return true; |