public final class SoyTypeOps extends Object
| Constructor and Description |
|---|
SoyTypeOps(SoyTypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
computeLowestCommonType(Collection<SoyType> types)
Compute the most specific type that is assignable from all types within
a collection.
|
SoyType |
computeLowestCommonType(SoyType t0,
SoyType t1)
Compute the most specific type that is assignable from both t0 and t1.
|
com.google.common.base.Optional<SoyType> |
computeLowestCommonTypeArithmetic(SoyType t0,
SoyType t1)
Compute the most specific type that is assignable from both t0 and t1, taking
into account arithmetic promotions - that is, converting int to float if needed.
|
SoyTypeRegistry |
getTypeRegistry() |
boolean |
isNumericOrUnknown(SoyType t0) |
@Inject public SoyTypeOps(SoyTypeRegistry typeRegistry)
public SoyTypeRegistry getTypeRegistry()
public SoyType computeLowestCommonType(SoyType t0, SoyType t1)
t0 - A type.t1 - Another type.public SoyType computeLowestCommonType(Collection<SoyType> types)
types - list of types.public com.google.common.base.Optional<SoyType> computeLowestCommonTypeArithmetic(SoyType t0, SoyType t1)
t0 - A type.t1 - Another type.public boolean isNumericOrUnknown(SoyType t0)