Class AbstractAction
- java.lang.Object
-
- com.facebook.buck.core.rules.actions.AbstractAction
-
- All Implemented Interfaces:
BuildEngineAction
,Action
- Direct Known Subclasses:
CopyAction
,RunAction
,WriteAction
public abstract class AbstractAction extends Object implements Action
Base implementation of anAction
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.collect.ImmutableSortedSet<Artifact>
inputs
protected com.google.common.collect.ImmutableSortedSet<OutputArtifact>
outputs
protected BuildTarget
owner
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAction(ActionRegistry registry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, String shortName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildTarget
getBuildTarget()
com.google.common.collect.ImmutableSet<BuildTarget>
getDependencies()
String
getID()
com.google.common.collect.ImmutableSortedSet<Artifact>
getInputs()
com.google.common.collect.ImmutableSortedSet<OutputArtifact>
getOutputs()
BuildTarget
getOwner()
String
getShortName()
com.google.common.collect.ImmutableSortedSet<SourcePath>
getSourcePathOutputs()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.facebook.buck.core.rules.actions.Action
execute, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
-
-
-
-
Field Detail
-
owner
protected final BuildTarget owner
-
inputs
protected final com.google.common.collect.ImmutableSortedSet<Artifact> inputs
-
outputs
protected final com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs
-
-
Constructor Detail
-
AbstractAction
protected AbstractAction(ActionRegistry registry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, String shortName)
- Parameters:
registry
- theDefaultActionRegistry
to registry this action for.inputs
- the inputArtifact
for thisAction
. They can be either outputs of otherAction
s or be source filesoutputs
- the outputs for thisAction
-
-
Method Detail
-
getOwner
public final BuildTarget getOwner()
-
getInputs
public final com.google.common.collect.ImmutableSortedSet<Artifact> getInputs()
-
getOutputs
public final com.google.common.collect.ImmutableSortedSet<OutputArtifact> getOutputs()
- Specified by:
getOutputs
in interfaceAction
- Returns:
- the set of outputs this action generates
-
getSourcePathOutputs
public com.google.common.collect.ImmutableSortedSet<SourcePath> getSourcePathOutputs()
- Specified by:
getSourcePathOutputs
in interfaceAction
- Specified by:
getSourcePathOutputs
in interfaceBuildEngineAction
- Returns:
- the set of outputs this
BuildEngineAction
builds. This is here for legacy as BuildRules deal withSourcePath
-
getShortName
public final String getShortName()
- Specified by:
getShortName
in interfaceAction
- Returns:
- a name for this action to be printed to console when executing and for logging purposes
-
getID
public final String getID()
-
getBuildTarget
public BuildTarget getBuildTarget()
- Specified by:
getBuildTarget
in interfaceBuildEngineAction
- Returns:
- the
BuildTarget
of the rule corresponding to this action
-
getDependencies
public com.google.common.collect.ImmutableSet<BuildTarget> getDependencies()
- Specified by:
getDependencies
in interfaceBuildEngineAction
- Returns:
- a set of dependencies required for this
BuildEngineAction
to build, as identified by theBuildTarget
.
-
-