public class DefaultActionRegistry extends BuildArtifactFactory implements ActionRegistry
target| Constructor and Description |
|---|
DefaultActionRegistry(BuildTarget buildTarget,
ActionAnalysisDataRegistry actionRegistry,
ProjectFilesystem filesystem) |
| Modifier and Type | Method and Description |
|---|---|
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
ActionRegistry.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()
Validates that all
DeclaredArtifacts have been bound to an ActionAnalysisDataKey |
bindtoBuildArtifact, createDeclaredArtifact, createDeclaredArtifactclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeclareArtifactpublic DefaultActionRegistry(BuildTarget buildTarget, ActionAnalysisDataRegistry actionRegistry, ProjectFilesystem filesystem)
buildTarget - the BuildTarget for which all of the Actions created are foractionRegistry - the ActionAnalysisDataRegistry that all actions created are
registered tofilesystem - the ProjectFilesystem to use for generating pathspublic Artifact declareArtifact(String output, com.google.devtools.build.lib.events.Location location) throws ArtifactDeclarationException
ActionRegistryActionRegistry.declareArtifact(Path, Location), but validates that the
string is a valid pathdeclareArtifact in interface ActionRegistryoutput - 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 invalidpublic Artifact declareArtifact(Path output, com.google.devtools.build.lib.events.Location location) throws ArtifactDeclarationException
declareArtifact in interface ActionRegistryoutput - 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 invalidpublic String registerActionAnalysisDataForAction(Action action) throws ActionCreationException
ActionRegistryActionWrapperData 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.
registerActionAnalysisDataForAction in interface ActionRegistryaction - the Action to create an ActionWrapperData for and registers itActionActionCreationExceptionpublic BuildTarget getOwner()
getOwner in interface ActionRegistryBuildTarget responsible for all the Actions registered to this
factory.public void verifyAllArtifactsBound()
BuildArtifactFactoryDeclaredArtifacts have been bound to an ActionAnalysisDataKeyverifyAllArtifactsBound in interface ActionRegistryverifyAllArtifactsBound in class BuildArtifactFactory