public abstract class SanitizedType extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SanitizedType.AttributesType
Type produced by templates whose kind is "attributes".
|
static class |
SanitizedType.CssType
Type produced by templates whose kind is "css".
|
static class |
SanitizedType.HtmlType
Type produced by templates whose kind is "html".
|
static class |
SanitizedType.JsType
Type produced by templates whose kind is "js".
|
static class |
SanitizedType.TrustedResourceUriType
Type produced by templates whose kind is "trustedResourceUri".
|
static class |
SanitizedType.UriType
Type produced by templates whose kind is "uri".
|
SoyType.Kind| Constructor and Description |
|---|
SanitizedType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
abstract SanitizedContent.ContentKind |
getContentKind()
Returns the content kind for this type.
|
static SoyType |
getTypeForContentKind(SanitizedContent.ContentKind contentKind)
Given a content kind, return the corresponding soy type.
|
int |
hashCode() |
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.
|
String |
toString() |
public abstract SanitizedContent.ContentKind getContentKind()
public boolean isInstance(SoyValue value)
SoyTypevalue - The value to test.public Class<? extends SoyValue> javaType()
SoyTypepublic static SoyType getTypeForContentKind(SanitizedContent.ContentKind contentKind)
For SanitizedContent.ContentKind.TEXT this returns StringType, for all other types it is a
SanitizedType.
public boolean isAssignableFrom(SoyType srcType)
SoyTypesrcType.isAssignableFrom in interface SoyTypesrcType - The type of the incoming value.