Add #toString for ContainingPackageLookupValue.
// limitations under the License.
package com.google.devtools.build.lib.skyframe;
+import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.collect.Interner;
import com.google.devtools.build.lib.cmdline.Label;
@@ -127,6 +128,11 @@ public abstract class ContainingPackageLookupValue implements SkyValue {
public Root getContainingPackageRoot() {
throw new IllegalStateException();
}
+
+ @Override
+ public String toString() {
+ return getClass().getName();
+ }
}
/** A successful lookup value. */
@@ -174,5 +180,13 @@ public abstract class ContainingPackageLookupValue implements SkyValue {
public int hashCode() {
return containingPackage.hashCode();
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this)
+ .add("containingPackage", containingPackage)
+ .add("containingPackageRoot", containingPackageRoot)
+ .toString();
+ }
}
}
