public class DefaultConstructorArgMarshaller extends Object implements ConstructorArgMarshaller
| Constructor and Description |
|---|
DefaultConstructorArgMarshaller() |
| 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.
|
public <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
ConstructorArgMarshallerUse the information contained in the params to fill in the public fields and
settable properties of dto. The following rules are used:
BuildTargets 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.
Lists and Sets 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.populate in interface ConstructorArgMarshallerdeclaredDeps - A builder to be populated with the declared dependencies.attributes - configured attributes that cannot contain selectable values (instances of
SelectorList)CoerceFailedException