From 9880b6969d7041b0d726c0eed8d52670cf7bf671 Mon Sep 17 00:00:00 2001 From: Michajlo Matijkiw Date: Tue, 27 Oct 2015 23:05:49 +0000 Subject: Visibility adjustments -- MOS_MIGRATED_REVID=106444993 --- .../build/lib/skyframe/FileContentsProxy.java | 10 ++++++++- .../build/lib/skyframe/FileStateValue.java | 24 ++++++++++++++++------ .../devtools/build/lib/skyframe/FileValue.java | 18 ++++++++-------- 3 files changed, 36 insertions(+), 16 deletions(-) (limited to 'src/main/java/com/google') diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java index 3c3403e804..ea0a2ecea4 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java @@ -31,7 +31,7 @@ public final class FileContentsProxy implements Serializable { private final long mtime; private final long valueId; - private FileContentsProxy(long mtime, long valueId) { + public FileContentsProxy(long mtime, long valueId) { this.mtime = mtime; this.valueId = valueId; } @@ -40,6 +40,14 @@ public final class FileContentsProxy implements Serializable { return new FileContentsProxy(mtime, valueId); } + public long getMtime() { + return mtime; + } + + public long getValueId() { + return valueId; + } + @Override public boolean equals(Object other) { if (other == this) { diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java index 3fffcd9c00..b774c5848b 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileStateValue.java @@ -144,7 +144,7 @@ public abstract class FileStateValue implements SkyValue { @Nullable private final byte[] digest; @Nullable private final FileContentsProxy contentsProxy; - private RegularFileStateValue(long size, long mtime, byte[] digest, + public RegularFileStateValue(long size, long mtime, byte[] digest, FileContentsProxy contentsProxy) { Preconditions.checkState((digest == null) != (contentsProxy == null)); this.size = size; @@ -198,16 +198,24 @@ public abstract class FileStateValue implements SkyValue { } @Override - long getSize() { + public long getSize() { return size; } + public long getMtime() { + return mtime; + } + @Override @Nullable - byte[] getDigest() { + public byte[] getDigest() { return digest; } + public FileContentsProxy getContentsProxy() { + return contentsProxy; + } + @Override public boolean equals(Object obj) { if (obj instanceof RegularFileStateValue) { @@ -237,7 +245,7 @@ public abstract class FileStateValue implements SkyValue { public static final class SpecialFileStateValue extends FileStateValue { private final FileContentsProxy contentsProxy; - private SpecialFileStateValue(FileContentsProxy contentsProxy) { + public SpecialFileStateValue(FileContentsProxy contentsProxy) { this.contentsProxy = contentsProxy; } @@ -268,6 +276,10 @@ public abstract class FileStateValue implements SkyValue { return null; } + public FileContentsProxy getContentsProxy() { + return contentsProxy; + } + @Override public boolean equals(Object obj) { if (obj instanceof SpecialFileStateValue) { @@ -321,7 +333,7 @@ public abstract class FileStateValue implements SkyValue { private final PathFragment symlinkTarget; - private SymlinkFileStateValue(PathFragment symlinkTarget) { + public SymlinkFileStateValue(PathFragment symlinkTarget) { this.symlinkTarget = symlinkTarget; } @@ -331,7 +343,7 @@ public abstract class FileStateValue implements SkyValue { } @Override - PathFragment getSymlinkTarget() { + public PathFragment getSymlinkTarget() { return symlinkTarget; } diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java index 0c45cf1bcd..804171d0e3 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java @@ -90,7 +90,7 @@ public abstract class FileValue implements SkyValue { */ public abstract RootedPath realRootedPath(); - abstract FileStateValue realFileStateValue(); + public abstract FileStateValue realFileStateValue(); /** * Returns the unresolved link target if {@link #isSymlink()}. @@ -147,12 +147,12 @@ public abstract class FileValue implements SkyValue { * requested path. For example, this is the case for the path "foo/bar/baz" if neither 'foo' nor * 'foo/bar' nor 'foo/bar/baz' are symlinks. */ - private static final class RegularFileValue extends FileValue { + public static final class RegularFileValue extends FileValue { private final RootedPath rootedPath; private final FileStateValue fileStateValue; - private RegularFileValue(RootedPath rootedPath, FileStateValue fileState) { + public RegularFileValue(RootedPath rootedPath, FileStateValue fileState) { this.rootedPath = Preconditions.checkNotNull(rootedPath); this.fileStateValue = Preconditions.checkNotNull(fileState); } @@ -163,7 +163,7 @@ public abstract class FileValue implements SkyValue { } @Override - FileStateValue realFileStateValue() { + public FileStateValue realFileStateValue() { return fileStateValue; } @@ -195,12 +195,12 @@ public abstract class FileValue implements SkyValue { * requested path. For example, this is the case for the path "foo/bar/baz" if at least one of * 'foo', 'foo/bar', or 'foo/bar/baz' is a symlink. */ - private static class DifferentRealPathFileValue extends FileValue { + public static class DifferentRealPathFileValue extends FileValue { protected final RootedPath realRootedPath; protected final FileStateValue realFileStateValue; - private DifferentRealPathFileValue(RootedPath realRootedPath, + public DifferentRealPathFileValue(RootedPath realRootedPath, FileStateValue realFileStateValue) { this.realRootedPath = Preconditions.checkNotNull(realRootedPath); this.realFileStateValue = Preconditions.checkNotNull(realFileStateValue); @@ -212,7 +212,7 @@ public abstract class FileValue implements SkyValue { } @Override - FileStateValue realFileStateValue() { + public FileStateValue realFileStateValue() { return realFileStateValue; } @@ -241,10 +241,10 @@ public abstract class FileValue implements SkyValue { } /** Implementation of {@link FileValue} for files that are symlinks. */ - private static final class SymlinkFileValue extends DifferentRealPathFileValue { + public static final class SymlinkFileValue extends DifferentRealPathFileValue { private final PathFragment linkValue; - private SymlinkFileValue(RootedPath realRootedPath, FileStateValue realFileState, + public SymlinkFileValue(RootedPath realRootedPath, FileStateValue realFileState, PathFragment linkTarget) { super(realRootedPath, realFileState); this.linkValue = linkTarget; -- cgit v1.2.3