Package com.facebook.buck.core.cell
Class AbstractCellPathResolver
- java.lang.Object
-
- com.facebook.buck.core.cell.AbstractCellPathResolver
-
- All Implemented Interfaces:
CellPathResolver
- Direct Known Subclasses:
CellPathResolverView
,DefaultCellPathResolver
public abstract class AbstractCellPathResolver extends Object implements CellPathResolver
Contains base logic forCellPathResolver
.
-
-
Constructor Summary
Constructors Constructor Description AbstractCellPathResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getCellPathOrThrow(CanonicalCellName cellName)
Path
getCellPathOrThrow(Optional<String> cellName)
com.google.common.collect.ImmutableSortedSet<AbsPath>
getKnownRoots()
Path
resolveCellRelativePath(CellRelativePath cellRelativePath)
Resolve a cell-relative path to an absolute path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.facebook.buck.core.cell.CellPathResolver
getCanonicalCellName, getCanonicalCellName, getCellNameResolver, getCellPath, getCellPathsByRootCellExternalName, getCurrentCellName, getNewCellPathResolver
-
-
-
-
Method Detail
-
getKnownRoots
public com.google.common.collect.ImmutableSortedSet<AbsPath> getKnownRoots()
- Specified by:
getKnownRoots
in interfaceCellPathResolver
- Returns:
- sorted set of known roots in reverse natural order
-
getCellPathOrThrow
public Path getCellPathOrThrow(Optional<String> cellName)
- Specified by:
getCellPathOrThrow
in interfaceCellPathResolver
- Parameters:
cellName
- name of cell, Optional.empty() for root cell.- Returns:
- Absolute path to the physical location of the cell
-
getCellPathOrThrow
public Path getCellPathOrThrow(CanonicalCellName cellName)
- Specified by:
getCellPathOrThrow
in interfaceCellPathResolver
- Returns:
- Absolute path to the physical location of the cell that contains the provided target
-
resolveCellRelativePath
public Path resolveCellRelativePath(CellRelativePath cellRelativePath)
Description copied from interface:CellPathResolver
Resolve a cell-relative path to an absolute path.- Specified by:
resolveCellRelativePath
in interfaceCellPathResolver
-
-