Class BuildArtifactFactory

  • Direct Known Subclasses:
    DefaultActionRegistry

    public class BuildArtifactFactory
    extends Object
    Factory for managing and creating the various 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.
    • Method Detail

      • createDeclaredArtifact

        protected com.facebook.buck.core.artifact.DeclaredArtifact createDeclaredArtifact​(Path output,
                                                                                          com.google.devtools.build.lib.events.Location location)
                                                                                   throws ArtifactDeclarationException
        Parameters:
        output - the output Path relative to the package path for the current rule that the Actions are being created for
        location - the location within the extension file where this artifact was declared. Location.BUILTIN may be used if not applicable.
        Returns:
        a DeclaredArtifact for the given path
        Throws:
        ArtifactDeclarationException - if the provided output path is invalid in some way
      • createDeclaredArtifact

        protected com.facebook.buck.core.artifact.DeclaredArtifact createDeclaredArtifact​(String output,
                                                                                          com.google.devtools.build.lib.events.Location location)
                                                                                   throws ArtifactDeclarationException
        Simple wrapper that also validates that a raw string is indeed a valid path
        Parameters:
        output - the output path relative to the package path for the current rule that the Actions are being created for
        location - the location within the extension file where this artifact was declared. Location.BUILTIN may be used if not applicable.
        Returns:
        a DeclaredArtifact for the given path
        Throws:
        ArtifactDeclarationException - if the provided output path is invalid in some way
      • verifyAllArtifactsBound

        protected void verifyAllArtifactsBound()
        Validates that all DeclaredArtifacts have been bound to an ActionAnalysisDataKey