public abstract class StringWithMacrosConverter extends Object
StringWithMacros
into an Arg
. Performs conversion eagerly, and meant
as a replacement for the lazy Arg
.
As this holds a reference to an ActionGraphBuilder
, instances of this object should
not be capture by anything in the action graph.
Constructor and Description |
---|
StringWithMacrosConverter() |
public abstract BuildTarget getBuildTarget()
protected abstract CellNameResolver getCellNameResolver()
public abstract ActionGraphBuilder getActionGraphBuilder()
public abstract com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>> getExpanders()
public abstract Optional<java.util.function.Function<String,String>> getSanitizer()
public static StringWithMacrosConverter of(BuildTarget buildTarget, CellNameResolver cellNameResolver, ActionGraphBuilder actionGraphBuilder, com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>> expanders)
public static StringWithMacrosConverter of(BuildTarget buildTarget, CellNameResolver cellNameResolver, ActionGraphBuilder actionGraphBuilder, com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>> expanders, Optional<java.util.function.Function<String,String>> sanitizer)
public static StringWithMacrosConverter of(BuildTarget buildTarget, CellNameResolver cellNameResolver, ActionGraphBuilder actionGraphBuilder, com.google.common.collect.ImmutableList<MacroExpander<? extends Macro,?>> expanders, Optional<java.util.function.Function<String,String>> sanitizer, HashMap<Macro,Object> precomputedWorkCache)
@Value.Auxiliary public abstract HashMap<Macro,Object> getPrecomputedWorkCache()
@Value.Derived public com.google.common.collect.ImmutableMap<Class<? extends Macro>,MacroExpander<? extends Macro,?>> getClassExpanders()
public Arg convert(StringWithMacros val)