T
- Buildable instance for the Genrule implementation.public abstract class BaseGenrule<T extends GenruleBuildable> extends ModernBuildRule<T> implements HasOutputName, HasMultipleOutputs
Buildable
, to be provided by child
classes.Modifier | Constructor and Description |
---|---|
protected |
BaseGenrule(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleResolver buildRuleResolver,
T buildable) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<OutputLabel> |
getOutputLabels()
returns a set of
OutputLabel instances associated with this build rule. |
String |
getOutputName(OutputLabel outputLabel)
Get the output name of the generated file, as listed in the BUCK file.
|
SourcePath |
getSourcePathToOutput()
Returns the output defined in 'out'.
|
com.google.common.collect.ImmutableSortedSet<SourcePath> |
getSourcePathToOutput(OutputLabel outputLabel)
Returns
SourcePath instances to the outputs associated with the given output label, or
null if the output label does not exist. |
String |
getType() |
boolean |
isCacheable()
Get whether or not the output of this genrule can be cached.
|
compareTo, getBuildable, getBuildCellPathFactory, getBuildDeps, getBuildSteps, getOutputPathResolver, getSetupStepsForBuildable, getSourcePath, getSourcePaths, injectFieldsIfNecessary, inputBasedRuleKeyIsEnabled, recordOutputs, recordOutputs, recordOutputs, stepsForBuildable, stepsForBuildable, updateBuildRuleResolver
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, hasBuildSteps, hashCode, injectFields, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
isSupported
protected BaseGenrule(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleResolver buildRuleResolver, T buildable)
public SourcePath getSourcePathToOutput()
getSourcePathToOutput(OutputLabel)
instead.getSourcePathToOutput
in interface HasMultipleOutputs
getSourcePathToOutput
in interface BuildRule
getSourcePathToOutput
in class ModernBuildRule<T extends GenruleBuildable>
public com.google.common.collect.ImmutableSortedSet<SourcePath> getSourcePathToOutput(OutputLabel outputLabel)
HasMultipleOutputs
SourcePath
instances to the outputs associated with the given output label, or
null
if the output label does not exist. If the default output label is given, returns
the default outputs associated with the rule.getSourcePathToOutput
in interface HasMultipleOutputs
public com.google.common.collect.ImmutableSet<OutputLabel> getOutputLabels()
HasMultipleOutputs
OutputLabel
instances associated with this build rule.getOutputLabels
in interface HasMultipleOutputs
public String getType()
getType
in interface HasNameAndType
getType
in class AbstractBuildRule
public String getOutputName(OutputLabel outputLabel)
getOutputName
in interface HasOutputName
public final boolean isCacheable()
isCacheable
in interface BuildEngineAction
isCacheable
in interface BuildRule
isCacheable
in class AbstractBuildRule