public interface SoyType
Note that this type hierarchy only describes types that are visible from a template author's perspective. Actual Soy values may have types which fall outside this hierarchy. An example is Futures - a SoyValue may contain a future of a type, but since the future is always resolved before the value is used, the future type is invisible as far as the template is concerned.
All type objects are immutable.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Interface and Description |
|---|---|
static class |
SoyType.Kind
Enum that identifies the kind of type this is.
|
| Modifier and Type | Method and Description |
|---|---|
SoyType.Kind |
getKind()
Returns what kind of type this is.
|
boolean |
isAssignableFrom(SoyType srcType)
Returns true if a parameter or field of this type can be assigned from
a value of
srcType. |
boolean |
isInstance(SoyValue value)
Returns true if the given value is an instance of this type.
|
Class<? extends SoyValue> |
javaType()
Returns the java class for the the SoyValue subclass that is used to represent this type.
|
SoyType.Kind getKind()
boolean isAssignableFrom(SoyType srcType)
srcType.srcType - The type of the incoming value.boolean isInstance(SoyValue value)
value - The value to test.