public interface ConstructorArgMarshaller
DescriptionWithTargetGraph
instances. There are two major uses this
information is put to: populating the DTO object from the deserialized JSON maps, which are
outputted by the functions added to Buck's core build file parsing script. The second function of
this class is to generate those functions.Modifier and Type | Method and Description |
---|---|
<T extends ConstructorArg> |
populate(CellNameResolver cellNameResolver,
ProjectFilesystem filesystem,
SelectorListResolver selectorListResolver,
TargetConfigurationTransformer targetConfigurationTransformer,
SelectableConfigurationContext configurationContext,
BuildTarget buildTarget,
TargetConfiguration hostConfiguration,
DependencyStack dependencyStack,
DataTransferObjectDescriptor<T> constructorArgDescriptor,
com.google.common.collect.ImmutableSet.Builder<BuildTarget> declaredDeps,
com.google.common.collect.ImmutableSet.Builder<BuildTarget> configurationDeps,
Map<String,?> attributes)
Creates a constructor argument using raw attributes that may contain configurable attributes.
|
<T extends ConstructorArg> T populate(CellNameResolver cellNameResolver, ProjectFilesystem filesystem, SelectorListResolver selectorListResolver, TargetConfigurationTransformer targetConfigurationTransformer, SelectableConfigurationContext configurationContext, BuildTarget buildTarget, TargetConfiguration hostConfiguration, DependencyStack dependencyStack, DataTransferObjectDescriptor<T> constructorArgDescriptor, com.google.common.collect.ImmutableSet.Builder<BuildTarget> declaredDeps, com.google.common.collect.ImmutableSet.Builder<BuildTarget> configurationDeps, Map<String,?> attributes) throws CoerceFailedException
Use the information contained in the params
to fill in the public fields and
settable properties of dto
. The following rules are used:
BuildTarget
s are resolved and will be fully qualified.
SourcePath
instances will be set to the appropriate implementation.
Path
declarations will be set to be relative to the project root.
List
s and Set
s will be populated with the expected generic type, provided
the wildcarding allows an upperbound to be determined to be one of the above.
Optional
field will be set to a default value
if none is set. This is typically Optional.empty()
, but in the case of collections is
an empty collection.cellNameResolver
- hostConfiguration
- declaredDeps
- A builder to be populated with the declared dependencies.attributes
- configured attributes that cannot contain selectable values (instances of
SelectorList
)CoerceFailedException