public interface ActionRegistry
Actions, which creates its corresponding ActionWrapperData.
This helps to hide and enforce the relationship between ActionAnalysisDataKey, ActionAnalysisData, Action, and BuildArtifact.
There is one registry per BuildTarget, such that all Actions registered by
this are considered to be associated with the build target.
| Modifier and Type | Method and Description |
|---|---|
default Artifact |
declareArtifact(Path output) |
Artifact |
declareArtifact(Path output,
com.google.devtools.build.lib.events.Location location) |
Artifact |
declareArtifact(String output,
com.google.devtools.build.lib.events.Location location)
Simple helper behaves like
declareArtifact(Path, Location), but validates that the
string is a valid path |
BuildTarget |
getOwner() |
String |
registerActionAnalysisDataForAction(Action action)
Creates the
ActionWrapperData from its Action and registers the ActionWrapperData to the ActionAnalysisDataRegistry. |
void |
verifyAllArtifactsBound()
Verifies that all the
Artifacts declared via declareArtifact(Path) has been
bound with an Action via registerActionAnalysisDataForAction(Action) |
default Artifact declareArtifact(Path output) throws ArtifactDeclarationException
output - the output Path relative to the package path for the current rule that
the Actions are being created forArtifact for the given pathArtifactDeclarationException - if the provided output path is invalidArtifact declareArtifact(String output, com.google.devtools.build.lib.events.Location location) throws ArtifactDeclarationException
declareArtifact(Path, Location), but validates that the
string is a valid pathoutput - the output path relative to the package path for hte current rule that the Actions are being created forlocation - if provided, the location within the extension file where this artifact was
declaredArtifact for hte given pathArtifactDeclarationException - if the provided output path is invalidArtifact declareArtifact(Path output, com.google.devtools.build.lib.events.Location location) throws ArtifactDeclarationException
output - the output Path relative to the package path for the current rule that
the Actions are being created forlocation - if provided, the location within the extension file where this artifact was
declaredArtifact for the given pathArtifactDeclarationException - if the provided output path is invalidString registerActionAnalysisDataForAction(Action action) throws ActionCreationException
ActionWrapperData from its Action and registers the ActionWrapperData to the ActionAnalysisDataRegistry.
This will materialize the declared Artifacts and bind them to the action. These
Artifacts that can be passed via Providers to be consumed.
action - the Action to create an ActionWrapperData for and registers itActionActionCreationExceptionBuildTarget getOwner()
BuildTarget responsible for all the Actions registered to this
factory.void verifyAllArtifactsBound()
Artifacts declared via declareArtifact(Path) has been
bound with an Action via registerActionAnalysisDataForAction(Action)