public class BuildArtifactFactory extends Object
Artifacts for a specific BuildTarget. All of the artifacts created by this instance of the factory will be rooted at the
package path as generated by BuildPaths.| Modifier and Type | Field and Description |
|---|---|
protected BuildTarget |
target |
| Modifier | Constructor and Description |
|---|---|
protected |
BuildArtifactFactory(BuildTarget target,
ProjectFilesystem filesystem) |
| Modifier and Type | Method and Description |
|---|---|
protected BuildArtifact |
bindtoBuildArtifact(ActionAnalysisDataKey key,
Artifact artifact) |
protected com.facebook.buck.core.artifact.DeclaredArtifact |
createDeclaredArtifact(Path output,
com.google.devtools.build.lib.events.Location location) |
protected com.facebook.buck.core.artifact.DeclaredArtifact |
createDeclaredArtifact(String output,
com.google.devtools.build.lib.events.Location location)
Simple wrapper that also validates that a raw string is indeed a valid path
|
protected void |
verifyAllArtifactsBound()
Validates that all
DeclaredArtifacts have been bound to an ActionAnalysisDataKey |
protected final BuildTarget target
protected BuildArtifactFactory(BuildTarget target, ProjectFilesystem filesystem)
protected com.facebook.buck.core.artifact.DeclaredArtifact createDeclaredArtifact(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 - the location within the extension file where this artifact was declared. Location.BUILTIN may be used if not applicable.DeclaredArtifact for the given pathArtifactDeclarationException - if the provided output path is invalid in some wayprotected com.facebook.buck.core.artifact.DeclaredArtifact createDeclaredArtifact(String 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 - the location within the extension file where this artifact was declared. Location.BUILTIN may be used if not applicable.DeclaredArtifact for the given pathArtifactDeclarationException - if the provided output path is invalid in some wayprotected BuildArtifact bindtoBuildArtifact(ActionAnalysisDataKey key, Artifact artifact)
key - the ActionAnalysisDataKey corresponding to an Action to bind the given Artifact to.artifact - the Artifact to bindBuildArtifact by binding the action to the given artifactprotected void verifyAllArtifactsBound()
DeclaredArtifacts have been bound to an ActionAnalysisDataKey