public abstract class AbstractParamInfo<T> extends Object implements ParamInfo<T>
ParamInfo.Traversal
Constructor and Description |
---|
AbstractParamInfo(String name,
TypeCoercer<?,T> typeCoercer)
Create an instance of
AbstractParamInfo |
Modifier and Type | Method and Description |
---|---|
boolean |
execConfiguration() |
String |
getName() |
String |
getPythonName() |
Class<?> |
getResultClass() |
TypeCoercer<?,T> |
getTypeCoercer() |
boolean |
hasElementTypes(Class<?>... types) |
boolean |
isConfigurable() |
boolean |
isDep() |
boolean |
isInput() |
boolean |
isTargetGraphOnlyDep() |
void |
set(CellNameResolver cellNameResolver,
ProjectFilesystem filesystem,
ForwardRelativePath pathRelativeToProjectRoot,
TargetConfiguration targetConfiguration,
TargetConfiguration hostConfiguration,
Object dto,
Object value)
Sets a single property of the
dto , coercing types as necessary. |
boolean |
splitConfiguration() |
void |
traverse(CellNameResolver cellNameResolver,
ParamInfo.Traversal traversal,
Object dto)
Traverse the value of the field on
dto that is represented by this instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getHint, getImplicitPreCoercionValue, isOptional, setCoercedValue
public AbstractParamInfo(String name, TypeCoercer<?,T> typeCoercer)
AbstractParamInfo
public String getName()
public TypeCoercer<?,T> getTypeCoercer()
getTypeCoercer
in interface ParamInfo<T>
TypeCoercer
that converts raw values to the correct type for this parampublic String getPythonName()
getPythonName
in interface ParamInfo<T>
public boolean isDep()
public boolean isTargetGraphOnlyDep()
isTargetGraphOnlyDep
in interface ParamInfo<T>
Hint.isTargetGraphOnlyDep()
public boolean isInput()
isInput
in interface ParamInfo<T>
Hint.isConfigurable()
public boolean isConfigurable()
isConfigurable
in interface ParamInfo<T>
public boolean splitConfiguration()
splitConfiguration
in interface ParamInfo<T>
Hint.splitConfiguration()
public boolean execConfiguration()
execConfiguration
in interface ParamInfo<T>
Hint.execConfiguration()
public Class<?> getResultClass()
getResultClass
in interface ParamInfo<T>
public void traverse(CellNameResolver cellNameResolver, ParamInfo.Traversal traversal, Object dto)
ParamInfo
dto
that is represented by this instance.
If this field has a top level Optional type, traversal begins at the Optional value, or not at all if the field is empty.
traverse
in interface ParamInfo<T>
traversal
- traversal to apply on the values.dto
- the object whose field will be traversed.TypeCoercer.traverse(com.facebook.buck.core.cell.nameresolver.CellNameResolver, Object,
TypeCoercer.Traversal)
public void set(CellNameResolver cellNameResolver, ProjectFilesystem filesystem, ForwardRelativePath pathRelativeToProjectRoot, TargetConfiguration targetConfiguration, TargetConfiguration hostConfiguration, Object dto, @Nullable Object value) throws ParamInfoException
ParamInfo
dto
, coercing types as necessary.set
in interface ParamInfo<T>
filesystem
- ProjectFilesystem
used to ensure Path
s exist.pathRelativeToProjectRoot
- The path relative to the project root that this DTO is for.dto
- The constructor DTO on which the value should be set.value
- The value, which may be coerced depending on the type on dto
.ParamInfoException
public boolean hasElementTypes(Class<?>... types)
hasElementTypes
in interface ParamInfo<T>