public class SkylarkParamInfo<T> extends AbstractParamInfo<T>
Attribute
.
This is used to get/set user specified attributes on SkylarkDescriptionArg
ParamInfo.Traversal
Constructor and Description |
---|
SkylarkParamInfo(String name,
Attribute<T> attr)
Create an instance of
SkylarkParamInfo |
Modifier and Type | Method and Description |
---|---|
T |
get(Object dto) |
Attribute<?> |
getAttr() |
Hint |
getHint() |
Object |
getImplicitPreCoercionValue() |
boolean |
isOptional() |
void |
setCoercedValue(Object dto,
Object value)
Set the param on dto to value, assuming value has already been coerced.
|
execConfiguration, getName, getPythonName, getResultClass, getTypeCoercer, hasElementTypes, isConfigurable, isDep, isInput, isTargetGraphOnlyDep, set, splitConfiguration, traverse
public SkylarkParamInfo(String name, Attribute<T> attr)
SkylarkParamInfo
name
- the user facing name of this attributeattr
- the attribute used to get coercion information, constraints, etc for this parampublic Attribute<?> getAttr()
public boolean isOptional()
@Nullable public Object getImplicitPreCoercionValue()
null
This is used for parameters that have a default value and need to be accessed by users'
rule implementations, but should not be set directly by users. e.g. underscore prefixed
attributes in user defined rules. These values are pre-coercion and may be user provided.
If this parameter is not an implicit parameter, this method should return null