public class CxxLinkGroupMappingCoercer extends Object implements TypeCoercer<Object,CxxLinkGroupMapping>
TypeCoercer
for CxxLinkGroupMapping
.
This TypeCoercer
is used to convert a single link group mapping entry (i.e., single
element in the list of link_group_map
to a CxxLinkGroupMapping
.
TypeCoercer.Traversal
Constructor and Description |
---|
CxxLinkGroupMappingCoercer(TypeCoercer<String,String> linkGroupTypeCoercer,
TypeCoercer<com.google.common.collect.ImmutableList<Object>,com.google.common.collect.ImmutableList<CxxLinkGroupMappingTarget>> mappingTargetCoercer) |
Modifier and Type | Method and Description |
---|---|
CxxLinkGroupMapping |
coerce(CellNameResolver cellRoots,
ProjectFilesystem filesystem,
ForwardRelativePath pathRelativeToProjectRoot,
TargetConfiguration targetConfiguration,
TargetConfiguration hostConfiguration,
Object object) |
Object |
coerceToUnconfigured(CellNameResolver cellRoots,
ProjectFilesystem filesystem,
ForwardRelativePath pathRelativeToProjectRoot,
Object object)
Coerce to a value for unconfigured graph.
|
com.google.common.reflect.TypeToken<CxxLinkGroupMapping> |
getOutputType() |
com.google.common.reflect.TypeToken<Object> |
getUnconfiguredType() |
boolean |
hasElementClass(Class<?>... types)
Returns whether the leaf nodes of this type coercer outputs value that is an instance of the
given class or its subclasses.
|
void |
traverse(CellNameResolver cellRoots,
CxxLinkGroupMapping object,
TypeCoercer.Traversal traversal)
Traverse an object guided by this TypeCoercer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkOutputAssignableTo, checkUnconfiguredAssignableTo, coerceBoth, concat, supportsConcatenation, unconfiguredToConfiguredCoercionIsIdentity
public CxxLinkGroupMappingCoercer(TypeCoercer<String,String> linkGroupTypeCoercer, TypeCoercer<com.google.common.collect.ImmutableList<Object>,com.google.common.collect.ImmutableList<CxxLinkGroupMappingTarget>> mappingTargetCoercer)
public com.google.common.reflect.TypeToken<CxxLinkGroupMapping> getOutputType()
getOutputType
in interface TypeCoercer<Object,CxxLinkGroupMapping>
public com.google.common.reflect.TypeToken<Object> getUnconfiguredType()
getUnconfiguredType
in interface TypeCoercer<Object,CxxLinkGroupMapping>
public boolean hasElementClass(Class<?>... types)
TypeCoercer
hasElementClass
in interface TypeCoercer<Object,CxxLinkGroupMapping>
public void traverse(CellNameResolver cellRoots, CxxLinkGroupMapping object, TypeCoercer.Traversal traversal)
TypeCoercer
#{link Traversal#traverse} function will be called once for the object. If the object is a collection or map, it will also recursively traverse all elements of the map.
traverse
in interface TypeCoercer<Object,CxxLinkGroupMapping>
public Object coerceToUnconfigured(CellNameResolver cellRoots, ProjectFilesystem filesystem, ForwardRelativePath pathRelativeToProjectRoot, Object object) throws CoerceFailedException
TypeCoercer
coerceToUnconfigured
in interface TypeCoercer<Object,CxxLinkGroupMapping>
CoerceFailedException
public CxxLinkGroupMapping coerce(CellNameResolver cellRoots, ProjectFilesystem filesystem, ForwardRelativePath pathRelativeToProjectRoot, TargetConfiguration targetConfiguration, TargetConfiguration hostConfiguration, Object object) throws CoerceFailedException
coerce
in interface TypeCoercer<Object,CxxLinkGroupMapping>
CoerceFailedException
- Input object cannot be coerced into the given type.