| Package | Description |
|---|---|
| com.google.template.soy.exprtree |
Expression parse tree.
|
| com.google.template.soy.incrementaldomsrc | |
| com.google.template.soy.jssrc.internal | |
| com.google.template.soy.passes | |
| com.google.template.soy.soytree.defn |
Nodes for representing various kinds of variable and parameter definitions.
|
| com.google.template.soy.types |
Classes that represent Soy parameter type declarations.
|
| com.google.template.soy.types.aggregate | |
| com.google.template.soy.types.parse |
Parser for Soy type expressions.
|
| com.google.template.soy.types.primitive | |
| com.google.template.soy.types.proto |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
VarRefNode.getType() |
SoyType |
VarNode.getType() |
SoyType |
StringNode.getType() |
SoyType |
NullNode.getType() |
SoyType |
IntegerNode.getType() |
SoyType |
GlobalNode.getType() |
SoyType |
FloatNode.getType() |
SoyType |
ExprNode.getType()
Gets the data type of this node.
|
SoyType |
BooleanNode.getType() |
SoyType |
AbstractParentExprNode.getType() |
SoyType |
VarDefn.type()
Returns the data type of this variable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
VarRefNode.setSubstituteType(SoyType type)
Override the type of the variable when used in this context.
|
void |
AbstractParentExprNode.setType(SoyType type) |
| Constructor and Description |
|---|
AbstractParentExprNode(SoyType type,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
GenIncrementalDomCodeVisitor.getJsTypeName(SoyType type) |
| Modifier and Type | Method and Description |
|---|---|
static String |
JsSrcUtils.getJsTypeExpr(SoyType type)
Given a Soy type, return the corresponding jscompiler doc type expression.
|
static String |
JsSrcUtils.getJsTypeExpr(SoyType type,
boolean addParensIfNeeded,
boolean addRequiredIfNeeded) |
static String |
JsSrcUtils.getJsTypeName(SoyType type)
Given a Soy type, return the corresponding jscompiler type name.
|
protected String |
GenJsCodeVisitor.getJsTypeName(SoyType type)
Returns the name of the JS type used to represent the given SoyType at runtime.
|
static boolean |
JsSrcUtils.isDefaultOptional(SoyType type)
Returns true if the given type is optional by default (in the jscompiler).
|
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.Multimap<String,SoyType> |
FindIndirectParamsVisitor.indirectParamTypes
Multimap from indirect param key to param types.
|
com.google.common.collect.Multimap<String,SoyType> |
FindIndirectParamsVisitor.IndirectParamsInfo.indirectParamTypes
Multimap from indirect param key to param types.
|
| Constructor and Description |
|---|
FindIndirectParamsVisitor.IndirectParamsInfo(SortedMap<String,TemplateParam> indirectParams,
com.google.common.collect.Multimap<String,TemplateNode> paramKeyToCalleesMultimap,
com.google.common.collect.Multimap<String,SoyType> indirectParamTypes,
boolean mayHaveIndirectParamsInExternalCalls,
boolean mayHaveIndirectParamsInExternalDelCalls) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyDocParam.type() |
| Modifier and Type | Method and Description |
|---|---|
void |
LocalVar.setType(SoyType type)
Setter for the type - this is necessary because sometimes we don't know
the variable type until after analysis.
|
| Constructor and Description |
|---|
HeaderParam(String name,
String typeSrc,
SoyType type,
boolean isRequired,
boolean isInjected,
String desc) |
InjectedParam(String name,
SoyType type) |
LocalVar(String name,
SoyNode.LocalVarNode declaringNode,
SoyType type) |
LoopVar(String name,
SoyNode.LocalVarNode declaringNode,
SoyType type) |
TemplateParam(String name,
SoyType type,
boolean isRequired,
boolean isInjected,
String desc) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
SoyEnumType
Type representing an enumeration.
|
interface |
SoyObjectType
Type representing an object.
|
| Modifier and Type | Field and Description |
|---|---|
static SoyType |
SoyTypes.NUMBER_TYPE
Shared constant for the 'number' type.
|
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyTypeOps.computeLowestCommonType(Collection<SoyType> types)
Compute the most specific type that is assignable from all types within
a collection.
|
SoyType |
SoyTypeOps.computeLowestCommonType(SoyType t0,
SoyType t1)
Compute the most specific type that is assignable from both t0 and t1.
|
SoyType |
SoyObjectType.getFieldType(String fieldName)
Return the data type of the field with the given name; If there's no such
field, then return
null. |
SoyType |
SoyTypeRegistry.getOrCreateUnionType(Collection<SoyType> members)
Factory function which creates a union type, given the member types.
|
SoyType |
SoyTypeRegistry.getOrCreateUnionType(SoyType... members)
Factory function which creates a union type, given the member types.
|
SoyType |
SoyTypeRegistry.getType(String typeName)
Look up a type by name.
|
SoyType |
SoyTypeProvider.getType(String typeName,
SoyTypeRegistry typeRegistry)
Given a fully-qualified name of a type, return the
SoyType
that describes this type, or null if this type provider does
not have a definition for the requested type. |
static SoyType |
SoyTypes.makeNullable(SoyType type) |
static SoyType |
SoyTypes.removeNull(SoyType type) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<SoyType> |
SoyTypeOps.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.
|
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyTypeOps.computeLowestCommonType(SoyType t0,
SoyType t1)
Compute the most specific type that is assignable from both t0 and t1.
|
com.google.common.base.Optional<SoyType> |
SoyTypeOps.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.
|
ListType |
SoyTypeRegistry.getOrCreateListType(SoyType elementType)
Factory function which creates a list type, given an element type.
|
MapType |
SoyTypeRegistry.getOrCreateMapType(SoyType keyType,
SoyType valueType)
Factory function which creates a map type, given a key and value type.
|
SoyType |
SoyTypeRegistry.getOrCreateUnionType(SoyType... members)
Factory function which creates a union type, given the member types.
|
boolean |
SoyType.isAssignableFrom(SoyType srcType)
Returns true if a parameter or field of this type can be assigned from
a value of
srcType. |
static boolean |
SoyTypes.isNullable(SoyType type) |
boolean |
SoyTypeOps.isNumericOrUnknown(SoyType t0) |
static SoyType |
SoyTypes.makeNullable(SoyType type) |
static SoyType |
SoyTypes.removeNull(SoyType type) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyTypeOps.computeLowestCommonType(Collection<SoyType> types)
Compute the most specific type that is assignable from all types within
a collection.
|
RecordType |
SoyTypeRegistry.getOrCreateRecordType(Map<String,SoyType> fields)
Factory function which creates a record type, given a map of fields.
|
SoyType |
SoyTypeRegistry.getOrCreateUnionType(Collection<SoyType> members)
Factory function which creates a union type, given the member types.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ListType
Represents the type of a list, a sequential random-access container keyed
by integer.
|
class |
MapType
Map type - generalized mapping type with key and value type arguments.
|
class |
RecordType
Dict type - classic dictionary type with string keys.
|
class |
UnionType
Type representing a set of possible alternative types.
|
| Modifier and Type | Method and Description |
|---|---|
SoyType |
ListType.getElementType() |
SoyType |
RecordType.getFieldType(String fieldName) |
SoyType |
MapType.getKeyType()
Returns the type for keys of this map.
|
SoyType |
MapType.getValueType()
Returns the type for values in this map.
|
static SoyType |
UnionType.of(Collection<SoyType> members)
Create a union from a collection of types.
|
static SoyType |
UnionType.of(SoyType... members)
Convenience method for creating unions.
|
SoyType |
UnionType.removeNullability()
Returns a Soy type that is equivalent to this one but with 'null' removed.
|
| Modifier and Type | Method and Description |
|---|---|
Set<SoyType> |
UnionType.getMembers()
Return the set of types contained in this union.
|
com.google.common.collect.ImmutableSortedMap<String,SoyType> |
RecordType.getMembers()
Return the members of this record type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
UnionType.isAssignableFrom(SoyType srcType) |
boolean |
RecordType.isAssignableFrom(SoyType srcType) |
boolean |
MapType.isAssignableFrom(SoyType srcType) |
boolean |
ListType.isAssignableFrom(SoyType srcType) |
static SoyType |
UnionType.of(SoyType... members)
Convenience method for creating unions.
|
static ListType |
ListType.of(SoyType elementType) |
static MapType |
MapType.of(SoyType keyType,
SoyType valueType) |
| Modifier and Type | Method and Description |
|---|---|
static SoyType |
UnionType.of(Collection<SoyType> members)
Create a union from a collection of types.
|
static RecordType |
RecordType.of(Map<String,? extends SoyType> members) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
TypeParser.parseTypeDeclaration()
Attempts to parse the input as a type declaration.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AnyType
The "any" type is the supertype of all other types.
|
class |
BoolType
Soy boolean type.
|
class |
ErrorType
A placeholder for errors during parsing.
|
class |
FloatType
Soy floating-point type.
|
class |
IntType
Soy integer type.
|
class |
NullType
The "null" type.
|
class |
SanitizedType
Implementation of types for sanitized strings, that is strings that are
produced by templates having a "kind" attribute.
|
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".
|
class |
StringType
Soy string type.
|
class |
UnknownType
The "unknown" type is used to indicate that the type was unspecified or could not
be inferred.
|
| Modifier and Type | Method and Description |
|---|---|
static SoyType |
SanitizedType.getTypeForContentKind(SanitizedContent.ContentKind contentKind)
Given a content kind, return the corresponding soy type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
UnknownType.isAssignableFrom(SoyType srcType) |
boolean |
StringType.isAssignableFrom(SoyType srcType) |
boolean |
ErrorType.isAssignableFrom(SoyType srcType) |
boolean |
AnyType.isAssignableFrom(SoyType srcType) |
| Modifier and Type | Class and Description |
|---|---|
class |
SoyProtoTypeImpl
A
SoyType subclass which describes a protocol buffer type. |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyProtoTypeImpl.getFieldType(String fieldName) |
SoyType |
SoyProtoTypeProvider.getType(String name,
SoyTypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
SoyProtoTypeImpl.isAssignableFrom(SoyType fromType) |