diff options
author | 2015-03-04 23:10:06 +0000 | |
---|---|---|
committer | 2015-03-05 18:31:25 +0000 | |
commit | cba3d7eff3d95b9557d1603955232ae1bca3806d (patch) | |
tree | ebc2513e9773c9bde12c4c2b32d1968cc1c52ff9 /src | |
parent | 19c3f94384d522b6d8bb7101bdb799131df2a420 (diff) |
Make the factory methods public in ValueWithMetadata. This might be needed for alternate graph implementations.
--
MOS_MIGRATED_REVID=87755843
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java b/src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java index 956e404906..e153a685e1 100644 --- a/src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java +++ b/src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java @@ -71,13 +71,14 @@ public abstract class ValueWithMetadata implements SkyValue { @Nullable abstract ErrorInfo getErrorInfo(); - abstract NestedSet<TaggedEvents> getTransitiveEvents(); + public abstract NestedSet<TaggedEvents> getTransitiveEvents(); - static final class ValueWithEvents extends ValueWithMetadata { + /** Implementation of {@link ValueWithMetadata} for the value case. */ + public static final class ValueWithEvents extends ValueWithMetadata { private final NestedSet<TaggedEvents> transitiveEvents; - ValueWithEvents(SkyValue value, NestedSet<TaggedEvents> transitiveEvents) { + public ValueWithEvents(SkyValue value, NestedSet<TaggedEvents> transitiveEvents) { super(Preconditions.checkNotNull(value)); this.transitiveEvents = Preconditions.checkNotNull(transitiveEvents); } @@ -87,7 +88,7 @@ public abstract class ValueWithMetadata implements SkyValue { ErrorInfo getErrorInfo() { return null; } @Override - NestedSet<TaggedEvents> getTransitiveEvents() { return transitiveEvents; } + public NestedSet<TaggedEvents> getTransitiveEvents() { return transitiveEvents; } /** * We override equals so that if the same value is written to a {@link NodeEntry} twice, it can @@ -122,12 +123,13 @@ public abstract class ValueWithMetadata implements SkyValue { public String toString() { return value.toString(); } } - static final class ErrorInfoValue extends ValueWithMetadata { + /** Implementation of {@link ValueWithMetadata} for the error case. */ + public static final class ErrorInfoValue extends ValueWithMetadata { private final ErrorInfo errorInfo; private final NestedSet<TaggedEvents> transitiveEvents; - ErrorInfoValue(ErrorInfo errorInfo, @Nullable SkyValue value, + public ErrorInfoValue(ErrorInfo errorInfo, @Nullable SkyValue value, NestedSet<TaggedEvents> transitiveEvents) { super(value); this.errorInfo = Preconditions.checkNotNull(errorInfo); @@ -139,7 +141,7 @@ public abstract class ValueWithMetadata implements SkyValue { ErrorInfo getErrorInfo() { return errorInfo; } @Override - NestedSet<TaggedEvents> getTransitiveEvents() { return transitiveEvents; } + public NestedSet<TaggedEvents> getTransitiveEvents() { return transitiveEvents; } @Override public boolean equals(Object o) { @@ -184,14 +186,14 @@ public abstract class ValueWithMetadata implements SkyValue { } } - static SkyValue justValue(SkyValue value) { + public static SkyValue justValue(SkyValue value) { if (value instanceof ValueWithMetadata) { return ((ValueWithMetadata) value).getValue(); } return value; } - static ValueWithMetadata wrapWithMetadata(SkyValue value) { + public static ValueWithMetadata wrapWithMetadata(SkyValue value) { if (value instanceof ValueWithMetadata) { return (ValueWithMetadata) value; } @@ -206,4 +208,4 @@ public abstract class ValueWithMetadata implements SkyValue { return null; } -}
\ No newline at end of file +} |