Package com.facebook.buck.rules.macros
Class BuildTargetMacro
- java.lang.Object
-
- com.facebook.buck.rules.macros.BuildTargetMacro
-
- All Implemented Interfaces:
Macro
,TargetTranslatable<Macro>
- Direct Known Subclasses:
AbstractExecutableTargetOrHostMacro
,BaseLocationMacro
,ClasspathAbiMacro
,ClasspathMacro
,MavenCoordinatesMacro
,WorkerMacro
public abstract class BuildTargetMacro extends Object implements Macro
Base class for macros wrapping a singleBuildTarget
.
-
-
Constructor Summary
Constructors Constructor Description BuildTargetMacro()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object another)
BuildTarget
getTarget()
abstract BuildTargetWithOutputs
getTargetWithOutputs()
int
hashCode()
Optional<Macro>
translateTargets(CellNameResolver cellPathResolver, BaseName targetBaseName, TargetNodeTranslator translator)
protected abstract BuildTargetMacro
withTargetWithOutputs(BuildTargetWithOutputs target)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.facebook.buck.rules.macros.Macro
getMacroClass
-
-
-
-
Method Detail
-
getTargetWithOutputs
public abstract BuildTargetWithOutputs getTargetWithOutputs()
-
getTarget
public BuildTarget getTarget()
-
withTargetWithOutputs
protected abstract BuildTargetMacro withTargetWithOutputs(BuildTargetWithOutputs target)
- Returns:
- a copy of this
BuildTargetMacro
with the givenBuildTargetWithOutputs
.
-
translateTargets
public final Optional<Macro> translateTargets(CellNameResolver cellPathResolver, BaseName targetBaseName, TargetNodeTranslator translator)
- Specified by:
translateTargets
in interfaceMacro
- Specified by:
translateTargets
in interfaceTargetTranslatable<Macro>
- Returns:
- if any changes are required, return the translated object.
-
-