| 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.bididirectives |
Plugin package of print directives for bidi (bidirectional text).
|
| com.google.template.soy.bidifunctions |
Plugin package of functions for bidi (bidirectional text).
|
| 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 |
Internal shared class among multiple backends.
|
| com.google.template.soy.shared.restricted | |
| com.google.template.soy.sharedpasses.render |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
static SoyString |
BasicDirectivesRuntime.changeNewlineToBr(SoyValue value) |
protected abstract String |
BasicEscapeDirective.escape(SoyValue value)
Performs the actual escaping.
|
static SoyString |
BasicDirectivesRuntime.insertWordBreaks(SoyValue value,
int maxCharsBetweenWordBreaks) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
BasicEscapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
static List<SoyValue> |
BasicFunctionsRuntime.keys(SoyLegacyObjectMap map)
Returns a list of all the keys in the given map.
|
static List<SoyValue> |
BasicFunctionsRuntime.mapKeys(SoyMap map)
Returns a list of all the keys in the given map.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
BasicFunctionsRuntime.ceil(SoyValue arg)
Returns the smallest (closest to negative infinity) integer value that is greater than or equal
to the argument.
|
static long |
BasicFunctionsRuntime.floor(SoyValue arg)
Returns the largest (closest to positive infinity) integer value that is less than or equal to
the argument.
|
static NumberData |
BasicFunctionsRuntime.max(SoyValue arg0,
SoyValue arg1)
Returns the numeric maximum of the two arguments.
|
static NumberData |
BasicFunctionsRuntime.min(SoyValue arg0,
SoyValue arg1)
Returns the numeric minimum of the two arguments.
|
static long |
BasicFunctionsRuntime.round(SoyValue value)
Rounds the given value to the closest integer.
|
static NumberData |
BasicFunctionsRuntime.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 |
|---|---|
static String |
BidiDirectivesRuntime.bidiSpanWrap(BidiGlobalDir dir,
SoyValue value) |
static SoyString |
BidiDirectivesRuntime.bidiUnicodeWrap(BidiGlobalDir dir,
SoyValue value) |
| Modifier and Type | Method and Description |
|---|---|
static String |
BidiFunctionsRuntime.bidiDirAttr(BidiGlobalDir dir,
SoyValue value,
boolean isHtml) |
static String |
BidiFunctionsRuntime.bidiMarkAfter(BidiGlobalDir bidiGlobalDir,
SoyValue value,
boolean isHtml) |
static int |
BidiFunctionsRuntime.bidiTextDir(SoyValue value,
boolean isHtml) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
static SanitizedContent |
CoreDirectivesRuntime.escapeHtml(SoyValue value) |
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
EscapeHtmlDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
IdDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
SoyValue |
NoAutoescapeDirective.applyForJava(SoyValue value,
List<SoyValue> args) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
SoyDict
A SoyRecord that also implements the SoyMap interface.
|
interface |
SoyEasyList
Deprecated.
|
interface |
SoyLegacyObjectMap
Deprecated.
This interface is the Java representation of the Soy type
legacy_object_map.
The modern Soy type is map, and its Java representation is SoyMap. Use those
instead. |
interface |
SoyList
A list containing values.
|
interface |
SoyMap
A map containing key-to-value mappings referred to as items.
|
interface |
SoyProtoValue
A value object containing a proto.
|
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 |
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.
|
class |
SoyProtoValueImpl
Soy value that wraps a protocol buffer message object.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract SoyValue |
SoyAbstractCachingValueProvider.compute()
Implemented by subclasses to do the heavy-lifting for resolving.
|
protected SoyValue |
SoyFutureValueProvider.compute()
Calls Future.get() and then converts the result to SoyValue.
|
SoyValue |
SoyList.get(int index)
Gets a value of this SoyList.
|
SoyValue |
SoyMap.get(SoyValue key)
Gets an item value of this SoyMap.
|
SoyValue |
SoyMapData.getField(String name) |
SoyValue |
SoyProtoValueImpl.getField(String name)
Deprecated.
|
SoyValue |
SoyRecord.getField(String name)
Gets a field value of this SoyRecord.
|
SoyValue |
SoyMapData.getItem(SoyValue key) |
SoyValue |
SoyListData.getItem(SoyValue key) |
SoyValue |
SoyLegacyObjectMap.getItem(SoyValue key)
Deprecated.
Gets an item value of this SoyMap.
|
SoyValue |
SoyProtoValueImpl.getItem(SoyValue key)
Deprecated.
|
SoyValue |
SoyProtoValue.getProtoField(String name)
Gets a value for the field for the underlying proto object.
|
SoyValue |
SoyProtoValueImpl.getProtoField(String name) |
SoyValue |
SoyAbstractCachingValueProvider.resolve() |
SoyValue |
SoyAbstractValue.resolve() |
SoyValue |
SoyValueProvider.resolve()
Usually, this method is a no-op that simply returns this object.
|
| Modifier and Type | Method and Description |
|---|---|
abstract List<SoyValue> |
LoggingFunctionInvocation.args()
Returns the arguments passed to the function.
|
Map<? extends SoyValue,? extends SoyValueProvider> |
SoyMap.asJavaMap()
Gets a Java map of all items in this SoyMap, where mappings are value to value provider.
|
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> |
SoyListData.getItemKeys() |
Iterable<? extends SoyValue> |
SoyLegacyObjectMap.getItemKeys()
Deprecated.
Gets an iterable over all item keys in this SoyMap.
|
Collection<SoyValue> |
SoyProtoValueImpl.getItemKeys()
Deprecated.
|
Iterable<? extends SoyValue> |
SoyMap.keys()
Gets an iterable over all item keys in this SoyMap.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
SoyAbstractCachingValueProvider.ValueAssertion.check(SoyValue value) |
boolean |
SoyMap.containsKey(SoyValue key)
Checks whether this SoyMap has an item with the given key.
|
SoyValue |
SoyMap.get(SoyValue key)
Gets an item value of this SoyMap.
|
SoyValue |
SoyMapData.getItem(SoyValue key) |
SoyValue |
SoyListData.getItem(SoyValue key) |
SoyValue |
SoyLegacyObjectMap.getItem(SoyValue key)
Deprecated.
Gets an item value of this SoyMap.
|
SoyValue |
SoyProtoValueImpl.getItem(SoyValue key)
Deprecated.
|
SoyValueProvider |
SoyMapData.getItemProvider(SoyValue key) |
SoyValueProvider |
SoyListData.getItemProvider(SoyValue key) |
SoyValueProvider |
SoyLegacyObjectMap.getItemProvider(SoyValue key)
Deprecated.
Gets a provider of an item value of this SoyMap.
|
SoyValueProvider |
SoyProtoValueImpl.getItemProvider(SoyValue key)
Deprecated.
|
SoyValueProvider |
SoyMap.getProvider(SoyValue key)
Gets a provider of an item value of this SoyMap.
|
boolean |
SoyMapData.hasItem(SoyValue key) |
boolean |
SoyListData.hasItem(SoyValue key) |
boolean |
SoyLegacyObjectMap.hasItem(SoyValue key)
Deprecated.
Checks whether this SoyMap has an item with the given key.
|
boolean |
SoyProtoValueImpl.hasItem(SoyValue key)
Deprecated.
|
SoyProtoValueImpl.Builder |
SoyProtoValueImpl.Builder.setField(String field,
SoyValue value) |
| Modifier and Type | Method and Description |
|---|---|
static LoggingFunctionInvocation |
LoggingFunctionInvocation.create(String functionName,
String placeholderValue,
List<SoyValue> args) |
| 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
Frankenstein class that can represent a Soy legacy object map
legacy_object_map<K,V>, a
Soy map map<K, V>, or a Soy record [field1: type1, ...] at runtime. |
class |
EasyListImpl
Deprecated.
|
class |
ListImpl
Internal implementation of SoyList backed by a list of SoyValueProviders.
|
class |
ParamStore
Internal-use param store for passing data in subtemplate calls.
|
class |
SoyMapImpl
A map containing key-to-value mappings referred to as items.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
DictImpl.get(SoyValue key) |
SoyValue |
SoyMapImpl.get(SoyValue key) |
SoyValue |
DictImpl.getField(String name) |
SoyValue |
ParamStore.getField(String name) |
SoyValue |
DictImpl.getItem(SoyValue key) |
| Modifier and Type | Method and Description |
|---|---|
Map<? extends SoyValue,? extends SoyValueProvider> |
DictImpl.asJavaMap() |
Map<? extends SoyValue,? extends SoyValueProvider> |
SoyMapImpl.asJavaMap() |
Map<String,? extends SoyValue> |
DictImpl.asResolvedJavaStringMap() |
Iterable<? extends SoyValue> |
DictImpl.getItemKeys() |
Iterable<? extends SoyValue> |
DictImpl.keys() |
Iterable<? extends SoyValue> |
SoyMapImpl.keys() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
DictImpl.containsKey(SoyValue key) |
boolean |
SoyMapImpl.containsKey(SoyValue key) |
SoyValue |
DictImpl.get(SoyValue key) |
SoyValue |
SoyMapImpl.get(SoyValue key) |
SoyValue |
DictImpl.getItem(SoyValue key) |
SoyValueProvider |
DictImpl.getItemProvider(SoyValue key) |
SoyValueProvider |
DictImpl.getProvider(SoyValue key) |
SoyValueProvider |
SoyMapImpl.getProvider(SoyValue key) |
boolean |
DictImpl.hasItem(SoyValue key) |
| Modifier and Type | Method and Description |
|---|---|
static SoyMapImpl |
SoyMapImpl.forProviderMap(Map<? extends SoyValue,? extends SoyValueProvider> providerMap)
Creates a SoyDict implementation for a particular underlying provider map.
|
| 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 |
JbcSrcRuntime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static SoyValue |
JbcSrcRuntime.callSoyFunction(SoyJavaFunction function,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaFunctions that may expect it.
|
SoyValue |
DetachableContentProvider.resolve() |
SoyValue |
DetachableSoyValueProvider.resolve() |
static SoyValue |
JbcSrcRuntime.resolveSoyValueProvider(SoyValueProvider provider)
Helper function to translate NullData -> null when resolving a SoyValueProvider.
|
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
JbcSrcRuntime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static String |
JbcSrcRuntime.coerceToString(SoyValue v) |
static boolean |
JbcSrcRuntime.compareNullableString(String string,
SoyValue other)
Determines if the operand's string form can be equality-compared with a string.
|
static SoyValueProvider |
JbcSrcRuntime.getSoyLegacyObjectMapItem(SoyLegacyObjectMap legacyObjectMap,
SoyValue key) |
static SoyValueProvider |
JbcSrcRuntime.getSoyMapItem(SoyMap soyMap,
SoyValue key) |
| Modifier and Type | Method and Description |
|---|---|
static SoyValue |
JbcSrcRuntime.applyPrintDirective(SoyJavaPrintDirective directive,
SoyValue value,
List<SoyValue> args)
Helper function to translate null -> NullData when calling SoyJavaPrintDirectives that may
expect it.
|
static SoyValue |
JbcSrcRuntime.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 |
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.
|
static SoyValue |
Sanitizers.filterNoAutoescape(SoyValue value)
Filters noAutoescape input from explicitly tainted content.
|
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 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 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 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 SanitizedContent |
Sanitizers.filterSipUri(SoyValue value)
Makes sure that the given input is a sip URI.
|
static SanitizedContent |
Sanitizers.filterTelUri(SoyValue value)
Makes sure that the given input is a tel URI.
|
static String |
Sanitizers.filterTrustedResourceUri(SoyValue value)
Makes sure the given input is an instance of either trustedResourceUrl or trustedString.
|
static boolean |
SharedRuntime.lessThan(SoyValue left,
SoyValue right)
Performs the
< operator on the two values. |
static boolean |
SharedRuntime.lessThanOrEqual(SoyValue left,
SoyValue right)
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 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.
|
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.
|
SoyValue |
SoyJavaFunction.computeForJava(List<SoyValue> args)
Computes this function on the given arguments.
|
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
SoyJavaPrintDirective.applyForJava(SoyValue value,
List<SoyValue> args)
Applies this directive on the given value.
|
| 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. |