public interface CellPathResolver
Modifier and Type | Method and Description |
---|---|
default Optional<String> |
getCanonicalCellName(AbsPath cellPath)
Abs-path version of
getCanonicalCellName(Path) . |
Optional<String> |
getCanonicalCellName(Path cellPath)
Returns a cell name that can be used to refer to the cell at the given path.
|
CellNameResolver |
getCellNameResolver()
Provides access to the
CellNameResolver for this cell. |
Optional<Path> |
getCellPath(Optional<String> cellName) |
Path |
getCellPathOrThrow(CanonicalCellName cellName) |
Path |
getCellPathOrThrow(Optional<String> cellName) |
com.google.common.collect.ImmutableMap<String,AbsPath> |
getCellPathsByRootCellExternalName() |
default CanonicalCellName |
getCurrentCellName()
Cell name resolver works in context of some cell.
|
com.google.common.collect.ImmutableSortedSet<AbsPath> |
getKnownRoots() |
NewCellPathResolver |
getNewCellPathResolver()
Provides access to the
NewCellPathResolver . |
Path |
resolveCellRelativePath(CellRelativePath cellRelativePath)
Resolve a cell-relative path to an absolute path.
|
default CanonicalCellName getCurrentCellName()
CellNameResolver getCellNameResolver()
CellNameResolver
for this cell. This is to assist in migration
to the new name/path resolvers.NewCellPathResolver getNewCellPathResolver()
NewCellPathResolver
. This is to assist in migration to the new
name/path resolvers.Optional<Path> getCellPath(Optional<String> cellName)
cellName
- name of cell, Optional.empty() for root cell.Optional.empty()
if the
cell name cannot be resolved.Path getCellPathOrThrow(Optional<String> cellName)
cellName
- name of cell, Optional.empty() for root cell.AssertionError
- if cell is not knownPath getCellPathOrThrow(CanonicalCellName cellName)
AssertionError
- if cell is not knownPath resolveCellRelativePath(CellRelativePath cellRelativePath)
com.google.common.collect.ImmutableMap<String,AbsPath> getCellPathsByRootCellExternalName()
Optional<String> getCanonicalCellName(Path cellPath)
Returns Optional.empty()
if the path refers to the root cell. Returns the
lexicographically smallest name if the cell path has multiple names.
Note: this is not the inverse of getCellPath(Optional)
, which returns the current,
rather than the root, cell path if the cell name is empty.
IllegalArgumentException
- if cell path is not known to the CellPathResolver.default Optional<String> getCanonicalCellName(AbsPath cellPath)
getCanonicalCellName(Path)
.com.google.common.collect.ImmutableSortedSet<AbsPath> getKnownRoots()