| Package | Description |
|---|---|
| com.google.template.soy.basicdirectives |
Plugin package for basic print directives.
|
| com.google.template.soy.basicfunctions |
Plugin package for basic functions.
|
| com.google.template.soy.coredirectives |
Plugin package for core print directives.
|
| com.google.template.soy.data |
Java representation of Soy data types.
|
| com.google.template.soy.data.internal | |
| com.google.template.soy.data.restricted | |
| com.google.template.soy.jbcsrc.runtime | |
| com.google.template.soy.shared.internal | |
| com.google.template.soy.shared.restricted | |
| com.google.template.soy.sharedpasses.render | |
| com.google.template.soy.types |
Classes that represent Soy parameter type declarations.
|
| com.google.template.soy.types.aggregate | |
| com.google.template.soy.types.primitive | |
| com.google.template.soy.types.proto |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
InsertWordBreaksDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
InsertWordBreaksDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
protected abstract String |
BasicEscapeDirective.escape(SoyValue value)
Performs the actual escaping.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
InsertWordBreaksDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
RoundFunction.computeForJava(List<SoyValue> args) |
SoyValue |
RandomIntFunction.computeForJava(List<SoyValue> args) |
SoyValue |
MinFunction.computeForJava(List<SoyValue> args) |
SoyValue |
MaxFunction.computeForJava(List<SoyValue> args) |
SoyValue |
KeysFunction.computeForJava(List<SoyValue> args) |
SoyValue |
FloorFunction.computeForJava(List<SoyValue> args) |
SoyValue |
CeilingFunction.computeForJava(List<SoyValue> args) |
SoyValue |
AugmentMapFunction.computeForJava(List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
static List<SoyValue> |
KeysFunction.keys(SoyMap map)
Returns a list of all the keys in the given map.
|
| Modifier and Type | Method and Description |
|---|---|
static IntegerData |
CeilingFunction.ceil(SoyValue arg)
Returns the smallest (closest to negative infinity) integer value that is greater than or equal
to the argument.
|
static IntegerData |
FloorFunction.floor(SoyValue arg)
Returns the largest (closest to positive infinity) integer value that is less than or equal to
the argument.
|
static NumberData |
MaxFunction.max(SoyValue arg0,
SoyValue arg1)
Returns the numeric maximum of the two arguments.
|
static NumberData |
MinFunction.min(SoyValue arg0,
SoyValue arg1)
Returns the numeric minimum of the two arguments.
|
static long |
RoundFunction.round(SoyValue value)
Rounds the given value to the closest integer.
|
static NumberData |
RoundFunction.round(SoyValue value,
int numDigitsAfterPoint)
Rounds the given value to the closest decimal point left (negative numbers) or right
(positive numbers) of the decimal point
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
RoundFunction.computeForJava(List<SoyValue> args) |
SoyValue |
RandomIntFunction.computeForJava(List<SoyValue> args) |
SoyValue |
MinFunction.computeForJava(List<SoyValue> args) |
SoyValue |
MaxFunction.computeForJava(List<SoyValue> args) |
SoyValue |
KeysFunction.computeForJava(List<SoyValue> args) |
SoyValue |
FloorFunction.computeForJava(List<SoyValue> args) |
SoyValue |
CeilingFunction.computeForJava(List<SoyValue> args) |
SoyValue |
AugmentMapFunction.computeForJava(List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
SoyDict
A SoyRecord that also implements the SoyMap interface.
|
interface |
SoyEasyDict
A mutable SoyDict with additional methods for ease-of-use.
|
interface |
SoyEasyList
A mutable list with additional methods for ease-of-use.
|
interface |
SoyList
A list containing values.
|
interface |
SoyMap
A map containing key-to-value mappings referred to as items.
|
interface |
SoyRecord
A record containing name-to-value mappings referred to as fields.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SanitizedContent
A chunk of sanitized content of a known kind, e.g.
|
class |
SoyAbstractCachingRecord
Abstract implementation of SoyRecord that caches previously retrieved field value providers.
|
class |
SoyAbstractList
Abstract implementation of SoyList.
|
class |
SoyAbstractMap
Abstract implementation of SoyMap.
|
class |
SoyAbstractRecord
Abstract implementation of SoyRecord.
|
class |
SoyAbstractValue
Abstract implementation of SoyValue.
|
class |
SoyData
Abstract base class for all nodes in a Soy data tree.
|
class |
SoyListData
A list data node in a Soy data tree.
|
class |
SoyMapData
A map data node in a Soy data tree.
|
| Modifier and Type | Method and Description |
|---|---|
protected SoyValue |
SoyFutureValueProvider.compute()
Calls Future.get() and then converts the result to SoyValue.
|
protected abstract SoyValue |
SoyAbstractCachingValueProvider.compute()
Implemented by subclasses to do the heavy-lifting for resolving.
|
SoyValue |
SoyList.get(int index)
Gets a value of this SoyList.
|
SoyValue |
SoyAbstractList.get(int index) |
SoyValue |
SoyEasyDict.get(String dottedName)
Gets a subfield value of this dict.
|
SoyValue |
SoyRecord.getField(String name)
Gets a field value of this SoyRecord.
|
SoyValue |
SoyMapData.getField(String name) |
SoyValue |
SoyAbstractRecord.getField(String name) |
SoyValue |
SoyMapData.getItem(SoyValue key) |
SoyValue |
SoyMap.getItem(SoyValue key)
Gets an item value of this SoyMap.
|
SoyValue |
SoyListData.getItem(SoyValue key) |
SoyValue |
SoyAbstractMap.getItem(SoyValue key) |
SoyValue |
SoyAbstractList.getItem(SoyValue key) |
SoyValue |
SoyValueProvider.resolve()
Usually, this method is a no-op that simply returns this object.
|
SoyValue |
SoyAbstractValue.resolve() |
SoyValue |
SoyAbstractCachingValueProvider.resolve() |
| Modifier and Type | Method and Description |
|---|---|
List<? extends SoyValue> |
SoyListData.asResolvedJavaList() |
List<? extends SoyValue> |
SoyList.asResolvedJavaList()
Gets a Java list all values in this SoyList.
|
Map<String,? extends SoyValue> |
SoyMapData.asResolvedJavaStringMap() |
Map<String,? extends SoyValue> |
SoyDict.asResolvedJavaStringMap()
Gets a Java map of all items in this SoyDict, where mappings are string to value.
|
Iterable<? extends SoyValue> |
SoyMap.getItemKeys()
Gets an iterable over all item keys in this SoyMap.
|
Iterable<? extends SoyValue> |
SoyListData.getItemKeys() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
SoyAbstractCachingValueProvider.ValueAssertion.check(SoyValue value) |
protected int |
SoyAbstractList.getIntegerIndex(SoyValue key)
Gets the integer index out of a SoyValue key, or throws SoyDataException if the key is not an
integer.
|
SoyValue |
SoyMapData.getItem(SoyValue key) |
SoyValue |
SoyMap.getItem(SoyValue key)
Gets an item value of this SoyMap.
|
SoyValue |
SoyListData.getItem(SoyValue key) |
SoyValue |
SoyAbstractMap.getItem(SoyValue key) |
SoyValue |
SoyAbstractList.getItem(SoyValue key) |
SoyValueProvider |
SoyMapData.getItemProvider(SoyValue key) |
SoyValueProvider |
SoyMap.getItemProvider(SoyValue key)
Gets a provider of an item value of this SoyMap.
|
SoyValueProvider |
SoyListData.getItemProvider(SoyValue key) |
SoyValueProvider |
SoyAbstractList.getItemProvider(SoyValue key) |
boolean |
SoyMapData.hasItem(SoyValue key) |
boolean |
SoyMap.hasItem(SoyValue key)
Checks whether this SoyMap has an item with the given key.
|
boolean |
SoyListData.hasItem(SoyValue key) |
boolean |
SoyAbstractList.hasItem(SoyValue key) |
| Modifier and Type | Class and Description |
|---|---|
class |
AugmentedParamStore
Implementation of ParamStore that represents a backing store augmented with additional fields
(params).
|
class |
BasicParamStore
Basic implementation of ParamStore.
|
class |
DictImpl
Internal implementation of SoyDict in terms of a map.
|
class |
EasyDictImpl
Internal implementation of SoyEasyDict.
|
class |
EasyListImpl
Internal implementation of SoyEasyList.
|
class |
ListImpl
Internal implementation of SoyList backed by a list of SoyValueProviders.
|
class |
ParamStore
Internal-use param store for passing data in subtemplate calls.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
EasyDictImpl.get(String dottedName) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
SoyString
A common marker super type for strings.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BooleanData
Boolean data.
|
class |
CollectionData
Abstract superclass for a node in a Soy data tree that represents a collection of data (i.e.
|
class |
FloatData
Float data.
|
class |
IntegerData
Integer data.
|
class |
NullData
Null data.
|
class |
NumberData
Abstract superclass for number data (integers and floats).
|
class |
PrimitiveData
Abstract superclass for a node in a Soy data tree that represents a piece of primitive data
(i.e.
|
class |
StringData
String data.
|
class |
UndefinedData
Undefined data.
|
| Modifier and Type | Field and Description |
|---|---|
protected SoyValue |
DetachableSoyValueProvider.resolvedValue |
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
Runtime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static SoyValue |
Runtime.callSoyFunction(SoyJavaFunction function,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaFunctions that may expect it.
|
SoyValue |
DetachableSoyValueProvider.resolve() |
SoyValue |
DetachableContentProvider.resolve() |
static SoyValue |
Runtime.resolveSoyValueProvider(SoyValueProvider provider)
Helper function to translate NullData -> null when resolving a SoyValueProvider that may
have come from SoyValueProvider.
|
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
Runtime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static String |
Runtime.coerceToString(SoyValue v) |
static SoyValueProvider |
Runtime.getSoyMapItem(SoyMap soyMap,
SoyValue key) |
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
Runtime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static SoyValue |
Runtime.callSoyFunction(SoyJavaFunction function,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaFunctions that may expect it.
|
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
SharedRuntime.minus(SoyValue operand0,
SoyValue operand1)
Performs the
- operator on the two values. |
static SoyValue |
SharedRuntime.plus(SoyValue operand0,
SoyValue operand1)
Performs the
+ operator on the two values. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
SharedRuntime.compareString(String string,
SoyValue other)
Determines if the operand's string form can be equality-compared with a string.
|
static double |
SharedRuntime.dividedBy(SoyValue operand0,
SoyValue operand1)
Performs the
/ operator on the two values. |
static boolean |
SharedRuntime.equal(SoyValue operand0,
SoyValue operand1)
Custom equality operator that smooths out differences between different Soy runtimes.
|
static boolean |
SharedRuntime.lessThan(SoyValue operand0,
SoyValue operand1)
Performs the
< operator on the two values. |
static boolean |
SharedRuntime.lessThanOrEqual(SoyValue operand0,
SoyValue operand1)
Performs the
<= operator on the two values. |
static SoyValue |
SharedRuntime.minus(SoyValue operand0,
SoyValue operand1)
Performs the
- operator on the two values. |
static NumberData |
SharedRuntime.negative(SoyValue node)
Performs the unary negation
- operator on the value. |
static SoyValue |
SharedRuntime.plus(SoyValue operand0,
SoyValue operand1)
Performs the
+ operator on the two values. |
static NumberData |
SharedRuntime.times(SoyValue operand0,
SoyValue operand1)
Performs the
* operator on the two values. |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyJavaPrintDirective.applyForJava(SoyValue value,
List<SoyValue> args)
Applies this directive on the given value.
|
static SoyValue |
Sanitizers.blessStringAsTrustedResourceUrlForLegacy(SoyValue value)
For any resource string/variable which has
|blessStringAsTrustedResuorceUrlForLegacy directive return the input value as is.
|
static SoyValue |
Sanitizers.blessStringAsTrustedResourceUrlForLegacy(String value)
For any resource string/variable which has
|blessStringAsTrustedResuorceUrlForLegacy directive return the input value as is after
converting it into SoyValue.
|
SoyValue |
SoyJavaFunction.computeForJava(List<SoyValue> args)
Computes this function on the given arguments.
|
static SoyValue |
Sanitizers.filterNoAutoescape(SoyValue value)
Filters noAutoescape input from explicitly tainted content.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyJavaPrintDirective.applyForJava(SoyValue value,
List<SoyValue> args)
Applies this directive on the given value.
|
static SoyValue |
Sanitizers.blessStringAsTrustedResourceUrlForLegacy(SoyValue value)
For any resource string/variable which has
|blessStringAsTrustedResuorceUrlForLegacy directive return the input value as is.
|
static SanitizedContent |
Sanitizers.cleanHtml(SoyValue value)
Normalizes the input HTML while preserving "safe" tags and the known directionality.
|
static SanitizedContent |
Sanitizers.cleanHtml(SoyValue value,
Collection<? extends TagWhitelist.OptionalSafeTag> optionalSafeTags)
Normalizes the input HTML while preserving "safe" tags and the known directionality.
|
static String |
Sanitizers.escapeCssString(SoyValue value)
Converts the input to the body of a CSS string literal.
|
static String |
Sanitizers.escapeHtml(SoyValue value)
Converts the input to HTML by entity escaping.
|
static String |
Sanitizers.escapeHtmlAttribute(SoyValue value)
Converts the input to HTML by entity escaping, stripping tags in sanitized content so the
result can safely be embedded in an HTML attribute value.
|
static String |
Sanitizers.escapeHtmlAttributeNospace(SoyValue value)
Converts plain text to HTML by entity escaping, stripping tags in sanitized content so the
result can safely be embedded in an unquoted HTML attribute value.
|
static String |
Sanitizers.escapeHtmlRcdata(SoyValue value)
Converts the input to HTML suitable for use inside
<textarea> by entity escaping. |
static String |
Sanitizers.escapeJsRegex(SoyValue value)
Converts the input to the body of a JavaScript regular expression literal.
|
static String |
Sanitizers.escapeJsString(SoyValue value)
Converts the input to the body of a JavaScript string by using
\n style escapes. |
static String |
Sanitizers.escapeJsValue(SoyValue value)
Converts the input to a JavaScript expression.
|
static String |
Sanitizers.escapeUri(SoyValue value)
Converts the input to a piece of a URI by percent encoding the value as UTF-8 bytes.
|
static String |
Sanitizers.filterCssValue(SoyValue value)
Makes sure that the input is a valid CSS identifier part, CLASS or ID part, quantity, or
CSS keyword part.
|
static String |
Sanitizers.filterHtmlAttributes(SoyValue value)
Checks that the input is a valid HTML attribute name with normal keyword or textual content
or known safe attribute content.
|
static String |
Sanitizers.filterHtmlElementName(SoyValue value)
Checks that the input is part of the name of an innocuous element.
|
static SanitizedContent |
Sanitizers.filterImageDataUri(SoyValue value)
Makes sure that the given input is a data URI corresponding to an image.
|
static SoyValue |
Sanitizers.filterNoAutoescape(SoyValue value)
Filters noAutoescape input from explicitly tainted content.
|
static String |
Sanitizers.filterNormalizeMediaUri(SoyValue value)
Checks that a URI is safe to be an image source.
|
static String |
Sanitizers.filterNormalizeUri(SoyValue value)
Makes sure that the given input doesn't specify a dangerous protocol and also
normalizes it. |
static String |
Sanitizers.filterTrustedResourceUri(SoyValue value)
Makes sure the given input is an instance of either trustedResourceUrl or trustedString.
|
static String |
Sanitizers.normalizeHtml(SoyValue value)
Normalizes HTML to HTML making sure quotes and other specials are entity encoded.
|
static String |
Sanitizers.normalizeHtmlNospace(SoyValue value)
Normalizes HTML to HTML making sure quotes, spaces and other specials are entity encoded
so that the result can be safely embedded in a valueless attribute.
|
static String |
Sanitizers.normalizeUri(SoyValue value)
Converts a piece of URI content to a piece of URI content that can be safely embedded
in an HTML attribute by percent encoding.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyJavaPrintDirective.applyForJava(SoyValue value,
List<SoyValue> args)
Applies this directive on the given value.
|
SoyValue |
SoyJavaFunction.computeForJava(List<SoyValue> args)
Computes this function on the given arguments.
|
| Modifier and Type | Method and Description |
|---|---|
protected SoyValue |
EvalVisitor.computeFunctionHelper(SoyJavaFunction fn,
List<SoyValue> args,
FunctionNode fnNode)
Protected helper for
computeFunction. |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends SoyValue> |
SoyType.javaType()
Returns the java class for the the SoyValue subclass that is used to represent this type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
SoyType.isInstance(SoyValue value)
Returns true if the given value is an instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends SoyValue> |
UnionType.javaType() |
Class<? extends SoyValue> |
RecordType.javaType() |
Class<? extends SoyValue> |
MapType.javaType() |
Class<? extends SoyValue> |
ListType.javaType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
UnionType.isInstance(SoyValue value) |
boolean |
RecordType.isInstance(SoyValue value) |
boolean |
MapType.isInstance(SoyValue value) |
boolean |
ListType.isInstance(SoyValue value) |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends SoyValue> |
UnknownType.javaType() |
Class<? extends SoyValue> |
StringType.javaType() |
Class<? extends SoyValue> |
SanitizedType.javaType() |
Class<? extends SoyValue> |
NullType.javaType() |
Class<? extends SoyValue> |
IntType.javaType() |
Class<? extends SoyValue> |
FloatType.javaType() |
Class<? extends SoyValue> |
ErrorType.javaType() |
Class<? extends SoyValue> |
BoolType.javaType() |
Class<? extends SoyValue> |
AnyType.javaType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
UnknownType.isInstance(SoyValue value) |
boolean |
StringType.isInstance(SoyValue value) |
boolean |
SanitizedType.isInstance(SoyValue value) |
boolean |
NullType.isInstance(SoyValue value) |
boolean |
IntType.isInstance(SoyValue value) |
boolean |
FloatType.isInstance(SoyValue value) |
boolean |
ErrorType.isInstance(SoyValue value) |
boolean |
BoolType.isInstance(SoyValue value) |
boolean |
AnyType.isInstance(SoyValue value) |
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SoyProtoTypeImpl.Value
Interface used to indicate that a value is a proto.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SoyProtoValue
Soy value that wraps a protocol buffer message object.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyProtoValue.getItem(SoyValue key) |
| Modifier and Type | Method and Description |
|---|---|
Collection<SoyValue> |
SoyProtoValue.getItemKeys() |
Class<? extends SoyValue> |
SoyProtoTypeImpl.javaType() |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyProtoValue.getItem(SoyValue key) |
SoyValueProvider |
SoyProtoValue.getItemProvider(SoyValue key) |
boolean |
SoyProtoValue.hasItem(SoyValue key) |
boolean |
SoyProtoTypeImpl.isInstance(SoyValue value) |