public final class SoyTypeOps extends Object
| Constructor and Description |
|---|
SoyTypeOps(SoyTypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
computeLeastCommonType(Collection<SoyType> types)
Compute the most specific type that is assignable from all types within
a collection.
|
SoyType |
computeLeastCommonType(SoyType t0,
SoyType t1)
Compute the most specific type that is assignable from both t0 and t1.
|
SoyType |
computeLeastCommonTypeArithmetic(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() |
@Inject public SoyTypeOps(SoyTypeRegistry typeRegistry)
public SoyTypeRegistry getTypeRegistry()
public SoyType computeLeastCommonType(SoyType t0, SoyType t1)
t0 - A type.t1 - Another type.public SoyType computeLeastCommonType(Collection<SoyType> types)
types - list of types.public SoyType computeLeastCommonTypeArithmetic(SoyType t0, SoyType t1)
t0 - A type.t1 - Another type.