@FunctionalInterface public interface PostCoercionTransform<AdditionalDataType,PostTransformType>
Attribute
on a build target utilizing
information only known at analysis time.
This is not done by the type coercer and Attribute.getValue(com.facebook.buck.core.cell.nameresolver.CellNameResolver, ProjectFilesystem,
ForwardRelativePath, TargetConfiguration, TargetConfiguration, Object)
for two reasons. The
ProjectFilesystem, ForwardRelativePath, TargetConfiguration, Object)} for two reasons. The first
is that some information (like ProviderInfoCollection
for dependencies) is not available
until the analysis phase, rather than the parsing / coercion / configuration phases. Secondly is
for speed. If we do not need to do a transformation on a given attribute, it's better to skip the
function call.
Modifier and Type | Method and Description |
---|---|
PostTransformType |
postCoercionTransform(Object coercedValue,
AdditionalDataType additionalData)
Transform a coerced attribute value for a specific rule in a way that utilizes deps.
|
PostTransformType postCoercionTransform(Object coercedValue, AdditionalDataType additionalData)
This is often done to transform attributes for a build target into something more useful to
users in their impelementation functions. e.g. a list of dependencies that are represented as
BuildTarget
s into a list of associated ProviderInfoCollection
s
coercedValue
- the value that has been coerced by Attribute.getTypeCoercer()
additionalData
- additional data that is used to perform the transformation of the coerced
data.deps
IllegalArgumentException
- if coercedValue
is not of the correct type or could
otherwise not be transformed (e.g. a required dep is missing from deps
).