public class ListTypeCoercer<U,T> extends CollectionTypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>,U,T> implements Concatable<com.google.common.collect.ImmutableList<T>>
ImmutableList
.TypeCoercer.Traversal
elementTypeCoercer
Constructor and Description |
---|
ListTypeCoercer(TypeCoercer<U,T> elementTypeCoercer) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<T> |
coerce(CellNameResolver cellRoots,
ProjectFilesystem filesystem,
ForwardRelativePath pathRelativeToProjectRoot,
TargetConfiguration targetConfiguration,
TargetConfiguration hostConfiguration,
com.google.common.collect.ImmutableList<U> object) |
com.google.common.collect.ImmutableList<U> |
coerceToUnconfigured(CellNameResolver cellRoots,
ProjectFilesystem filesystem,
ForwardRelativePath pathRelativeToProjectRoot,
Object object)
Coerce to a value for unconfigured graph.
|
com.google.common.collect.ImmutableList<T> |
concat(Iterable<com.google.common.collect.ImmutableList<T>> elements)
Implementation of concatenation for this type.
|
com.google.common.reflect.TypeToken<com.google.common.collect.ImmutableList<T>> |
getOutputType() |
com.google.common.reflect.TypeToken<com.google.common.collect.ImmutableList<U>> |
getUnconfiguredType() |
boolean |
unconfiguredToConfiguredCoercionIsIdentity()
TypeCoercer.coerce(CellNameResolver, ProjectFilesystem, ForwardRelativePath, TargetConfiguration,
TargetConfiguration, Object) must be no-op when this returns true . |
fillConfigured, fillUnconfigured, hasElementClass, traverse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkOutputAssignableTo, checkUnconfiguredAssignableTo, coerceBoth, supportsConcatenation
public ListTypeCoercer(TypeCoercer<U,T> elementTypeCoercer)
public com.google.common.reflect.TypeToken<com.google.common.collect.ImmutableList<T>> getOutputType()
getOutputType
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
public com.google.common.reflect.TypeToken<com.google.common.collect.ImmutableList<U>> getUnconfiguredType()
getUnconfiguredType
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
public boolean unconfiguredToConfiguredCoercionIsIdentity()
TypeCoercer
TypeCoercer.coerce(CellNameResolver, ProjectFilesystem, ForwardRelativePath, TargetConfiguration,
TargetConfiguration, Object)
must be no-op when this returns true
.unconfiguredToConfiguredCoercionIsIdentity
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
public com.google.common.collect.ImmutableList<T> coerce(CellNameResolver cellRoots, ProjectFilesystem filesystem, ForwardRelativePath pathRelativeToProjectRoot, TargetConfiguration targetConfiguration, TargetConfiguration hostConfiguration, com.google.common.collect.ImmutableList<U> object) throws CoerceFailedException
coerce
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
CoerceFailedException
- Input object cannot be coerced into the given type.public com.google.common.collect.ImmutableList<U> coerceToUnconfigured(CellNameResolver cellRoots, ProjectFilesystem filesystem, ForwardRelativePath pathRelativeToProjectRoot, Object object) throws CoerceFailedException
TypeCoercer
coerceToUnconfigured
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
CoerceFailedException
public com.google.common.collect.ImmutableList<T> concat(Iterable<com.google.common.collect.ImmutableList<T>> elements)
TypeCoercer
null
indicates that concatenation
isn't supported by the type.concat
in interface Concatable<com.google.common.collect.ImmutableList<T>>
concat
in interface TypeCoercer<com.google.common.collect.ImmutableList<U>,com.google.common.collect.ImmutableList<T>>
null
if concatenation is not
supported for the type