Class WriteAction
- java.lang.Object
-
- com.facebook.buck.core.rules.actions.AbstractAction
-
- com.facebook.buck.core.rules.actions.lib.WriteAction
-
- All Implemented Interfaces:
BuildEngineAction
,Action
public class WriteAction extends AbstractAction
-
-
Field Summary
-
Fields inherited from class com.facebook.buck.core.rules.actions.AbstractAction
inputs, outputs, owner
-
-
Constructor Summary
Constructors Constructor Description WriteAction(ActionRegistry actionRegistry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, CommandLineArgs contents, boolean isExecutable)
Create an instance ofWriteAction
WriteAction(ActionRegistry actionRegistry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, String contents, boolean isExecutable)
Create an instance ofWriteAction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionExecutionResult
execute(ActionExecutionContext executionContext)
Executes this action as part of the buildboolean
isCacheable()
TODO(bobyf): should we still have this or should we enforce everything to be cacheable-
Methods inherited from class com.facebook.buck.core.rules.actions.AbstractAction
getBuildTarget, getDependencies, getID, getInputs, getOutputs, getOwner, getShortName, 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
outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
-
-
-
-
Constructor Detail
-
WriteAction
public WriteAction(ActionRegistry actionRegistry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, String contents, boolean isExecutable)
Create an instance ofWriteAction
- Parameters:
actionRegistry
- theDefaultActionRegistry
to register this actioninputs
- the inputArtifact
for thisAction
. They can be either outputs of otherAction
s or be source filesoutputs
- the outputs for thisAction
contents
- the contents to writeisExecutable
- whether the output is executable
-
WriteAction
public WriteAction(ActionRegistry actionRegistry, com.google.common.collect.ImmutableSortedSet<Artifact> inputs, com.google.common.collect.ImmutableSortedSet<OutputArtifact> outputs, CommandLineArgs contents, boolean isExecutable)
Create an instance ofWriteAction
- Parameters:
actionRegistry
- theDefaultActionRegistry
to register this actioninputs
- the inputArtifact
for thisAction
. They can be either outputs of otherAction
s or be source filesoutputs
- the outputs for thisAction
contents
- the contents to writeisExecutable
- whether the output is executable
-
-
Method Detail
-
execute
public ActionExecutionResult execute(ActionExecutionContext executionContext)
Description copied from interface:Action
Executes this action as part of the build- Parameters:
executionContext
- a set of information the action can use for execution- Returns:
ActionExecutionResult
indicating the status of execution
-
-