public interface SkylarkDescriptionArgBuilder
SkylarkDescriptionArg
.
This is primarily used to remove a circular dependency in buck around SkylarkDescriptionArg
. We want SkylarkDescriptionArg
to have a copy of SkylarkUserDefinedRule
. We also want SkylarkUserDefinedRule
(which owns the Attribute mapping)
to be able to hold onto the corresponding SkylarkParamInfo
mapping. SkylarkParamInfo
ultimately needs to be able to set
values on a SkylarkDescriptionArg
, though. So, if we
used SkylarkDescriptionArg
, rather than a builder,
we'd run into this circular dep: SkylarkUserDefinedRule
-> SkylarkParamInfo
-> SkylarkDescriptionArg
-> SkylarkUserDefinedRule
This abstraction lets us easily just set/get post-coercion values in a SkylarkDescriptionArg
that is in the process of being
constructed, without having to know about the SkylarkUserDefinedRule
that the com.facebook.buck.core.starlark.rule.SkylarkDescriptionArgs
holds onto.
Modifier and Type | Method and Description |
---|---|
Object |
getPostCoercionValue(String attr)
Get an attribute's value after it was set in
setPostCoercionValue(String, Object) |
void |
setPostCoercionValue(String attr,
Object value)
Set the value for a specific attribute after it has been successfully coerced/type checked.
|
void setPostCoercionValue(String attr, Object value)
SkylarkUserDefinedRule
attr
- The attribute to set the value forvalue
- The value to set. Must not be null.Object getPostCoercionValue(String attr)
setPostCoercionValue(String, Object)
It is an error to get an attribute that has not been set.
attr
- The attribute to get the value for