public interface CellNameResolver
CanonicalCellName
.
For a multi-cell build, each cell may have a different set of names that are visible to that cell (defined in that cell's .buckconfig), but each cell has a single canonical name. In addition, the names are not necessarily consistent across cells, two cells can have different names for the same cell (e.g. the most well-known such inconsistency would be that the empty name maps to the current cell in all cells).
The CellNameResolver is different for each cell and most things should convert to a CanonicalCellName
as soon as possible and deal only with those from then on.
Modifier and Type | Method and Description |
---|---|
default CanonicalCellName |
getCurrentCellName()
Cell name resolver works in context of some cell.
|
com.google.common.collect.ImmutableMap<Optional<String>,CanonicalCellName> |
getKnownCells()
Gets the mapping for all the available local names.
|
CanonicalCellName |
getName(Optional<String> localName)
Resolves the local name to the
CanonicalCellName . |
Optional<CanonicalCellName> |
getNameIfResolvable(Optional<String> localName)
Returns the
CanonicalCellName for this local name if it can be resolved. |
default CanonicalCellName getCurrentCellName()
Optional<CanonicalCellName> getNameIfResolvable(Optional<String> localName)
CanonicalCellName
for this local name if it can be resolved.CanonicalCellName getName(Optional<String> localName)
CanonicalCellName
.UnknownCellException
- if the alias is not resolvable.com.google.common.collect.ImmutableMap<Optional<String>,CanonicalCellName> getKnownCells()