From 137920a5d64a14f95c4b4e2b7fdc2006ba00ab24 Mon Sep 17 00:00:00 2001 From: Nathan Harmata Date: Wed, 22 Jun 2016 17:47:51 +0000 Subject: Update the javadoc of TargetPattern#getDirectory in the presence of commit 8096c4274ac57267dace4166ac05d5665b098d95. -- MOS_MIGRATED_REVID=125582515 --- .../google/devtools/build/lib/cmdline/TargetPattern.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') 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 ca09fdb511..610a27e014 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 @@ -178,13 +178,16 @@ public abstract class TargetPattern implements Serializable { } /** - * Returns the most specific containing directory of the patterns that could be matched by this - * pattern. + * Returns a {@link PackageIdentifier} identifying the most specific containing directory of the + * patterns that could be matched by this pattern. * - *

For patterns of type {@code Type.TARGETS_BELOW_DIRECTORY}, this returns the referred-to - * directory. For example, for "//foo/bar/...", this returns "foo/bar". + *

Note that we are using the {@link PackageIdentifier} type as a convenience; there may not + * actually be a package corresponding to this directory! * - *

The returned value always has no leading "//" and no trailing "/". + *

For patterns of type {@code Type.TARGETS_BELOW_DIRECTORY}, this returns a + * {@link PackageIdentifier} that identifies the referred-to directory. For example, for a + * {@code Type.TARGETS_BELOW_DIRECTORY} corresponding to "//foo/bar/...", this method returns a + * {@link PackageIdentifier} for "foo/bar". */ public abstract PackageIdentifier getDirectory(); -- cgit v1.2.3