| Modifier and Type | Method and Description |
|---|---|
SoyRuntimeType |
asNonNullable() |
SoyRuntimeType |
asNullable() |
boolean |
assignableToNullableFloat() |
boolean |
assignableToNullableInt() |
boolean |
assignableToNullableNumber() |
boolean |
assignableToNullableString() |
static SoyRuntimeType |
getBoxedType(SoyType soyType)
Returns the boxed representation of the given type.
|
static com.google.common.base.Optional<SoyRuntimeType> |
getUnboxedType(SoyType soyType)
Returns the unboxed
jbcsrc representation of the given type, or absent if no such
representation exists. |
boolean |
isKnownBool() |
boolean |
isKnownFloat()
Returns
true if the expression is known to be a float at compile time. |
boolean |
isKnownInt()
Returns
true if the expression is known to be an int at compile time. |
boolean |
isKnownLegacyObjectMap() |
boolean |
isKnownList() |
boolean |
isKnownMap() |
boolean |
isKnownNumber()
|
boolean |
isKnownProto() |
boolean |
isKnownRecord() |
boolean |
isKnownSanitizedContent() |
boolean |
isKnownString()
Returns
true if the expression is known to be a string at compile time. |
boolean |
isKnownStringOrSanitizedContent() |
org.objectweb.asm.Type |
runtimeType() |
SoyType |
soyType() |
String |
toString() |
public static com.google.common.base.Optional<SoyRuntimeType> getUnboxedType(SoyType soyType)
jbcsrc representation of the given type, or absent if no such
representation exists.
Types will fail to have unboxed representations mostly for unknown, any and union types.
public static SoyRuntimeType getBoxedType(SoyType soyType)
public final SoyType soyType()
public final org.objectweb.asm.Type runtimeType()
public boolean assignableToNullableInt()
public boolean assignableToNullableFloat()
public boolean assignableToNullableNumber()
public boolean assignableToNullableString()
public boolean isKnownString()
true if the expression is known to be a string at compile time.
Note: If this returns false, there is no guarantee that this expression is
not a string, just that it is not known to be a string at compile time. For
example, $b ? 'hello' : 2 is a valid soy expression that will be typed as 'any' at
compile time. So isKnownString() on that soy expression will return false even though
it may in fact be a string.
public boolean isKnownStringOrSanitizedContent()
public boolean isKnownSanitizedContent()
public boolean isKnownInt()
true if the expression is known to be an int at compile time.
Note: If this returns false, there is no guarantee that this expression is
not a int, just that it is not known to be a int at compile time.
public final boolean isKnownFloat()
true if the expression is known to be a float at compile time.
Note: If this returns false, there is no guarantee that this expression is
not a float, just that it is not known to be a float at compile time.
public final boolean isKnownList()
public final boolean isKnownLegacyObjectMap()
public final boolean isKnownMap()
public final boolean isKnownRecord()
public final boolean isKnownBool()
public final boolean isKnownProto()
public final boolean isKnownNumber()
public final SoyRuntimeType asNonNullable()
public final SoyRuntimeType asNullable()