diff options
author | Googler <noreply@google.com> | 2015-02-19 23:55:37 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-02-19 23:55:37 +0000 |
commit | f6a83d145bb37bda3cb2dfc5cda59d6e86ecb299 (patch) | |
tree | 9716c30d19ec5cd880f641dbab785f9aed1aa507 /src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java | |
parent | aff6fd76d644317f6813e464db57d5640e588378 (diff) |
Description redacted.
--
MOS_MIGRATED_REVID=86738858
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java b/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java new file mode 100644 index 0000000000..50aeb9ae2b --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/analysis/SkyframePackageRootResolver.java @@ -0,0 +1,40 @@ +// Copyright 2014 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.analysis; + +import com.google.devtools.build.lib.actions.PackageRootResolver; +import com.google.devtools.build.lib.actions.Root; +import com.google.devtools.build.lib.skyframe.SkyframeExecutor; +import com.google.devtools.build.lib.vfs.PathFragment; + +import java.util.Map; + +/** + * Skyframe implementation of {@link PackageRootResolver}. + * + * <p> Note: you should not use this class inside any SkyFunctions. + */ +public final class SkyframePackageRootResolver implements PackageRootResolver { + private final SkyframeExecutor executor; + + public SkyframePackageRootResolver(SkyframeExecutor executor) { + this.executor = executor; + } + + @Override + public Map<PathFragment, Root> findPackageRoots(Iterable<PathFragment> execPaths) { + return executor.getArtifactRoots(execPaths); + } +}
\ No newline at end of file |