| Package | Description |
|---|---|
| com.google.template.soy.data |
Java representation of Soy data types.
|
| com.google.template.soy.internal.i18n |
Libraries for internationalization (i18n).
|
| com.google.template.soy.jbcsrc.restricted | |
| com.google.template.soy.shared.internal |
Internal shared class among multiple backends.
|
| Modifier and Type | Method and Description |
|---|---|
Dir |
SanitizedContent.getContentDirection()
Returns the content's direction; null indicates that the direction is unknown, and is to be
estimated when necessary.
|
Dir |
SanitizedContent.ContentKind.getDefaultDir() |
Dir |
LoggingAdvisingAppendable.getSanitizedContentDirectionality()
Returns the directionality of this appendable.
|
static Dir |
Dir.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Dir[] |
Dir.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ForwardingLoggingAdvisingAppendable.notifyContentDirectionality(Dir contentDir) |
protected void |
LoggingAdvisingAppendable.notifyContentDirectionality(Dir contentDir)
Called when the directionality is initially set.
|
protected void |
LoggingAdvisingAppendable.BufferingAppendable.notifyContentDirectionality(Dir contentDir) |
static SanitizedContent |
UnsafeSanitizedContentOrdainer.ordainAsSafe(String value,
SanitizedContent.ContentKind kind,
Dir dir)
Faithfully assumes the provided value is "safe" and marks it not to be re-escaped.
|
LoggingAdvisingAppendable |
LoggingAdvisingAppendable.setSanitizedContentDirectionality(Dir contentDir)
Marks the directionality of this appendable.
|
static SanitizedContent |
SanitizedContents.unsanitizedText(String text,
Dir dir)
Creates a SanitizedContent object of kind TEXT of a given direction (null if unknown).
|
| Modifier and Type | Method and Description |
|---|---|
static Dir |
BidiUtils.estimateDirection(String str,
boolean isHtml)
Estimates the directionality of a string based on relative word counts, as detailed below.
|
static Dir |
BidiUtils.getExitDir(String str,
boolean isHtml)
Returns the directionality of the last character with strong directionality in the string, or
Dir.NEUTRAL if none was encountered.
|
Dir |
BidiGlobalDir.toDir()
Converts this into a
Dir if it represents LTR or RTL. |
| Modifier and Type | Method and Description |
|---|---|
static BidiFormatter |
BidiFormatter.getInstance(Dir contextDir)
Factory for creating an instance of BidiFormatter given the context directionality.
|
String |
BidiFormatter.knownDirAttr(Dir dir)
Returns "dir=\"ltr\"" or "dir=\"rtl\"", depending on the given directionality, if it is not
NEUTRAL or the same as the context directionality.
|
String |
BidiFormatter.markAfter(Dir dir,
String str,
boolean isHtml)
Returns a Unicode bidi mark matching the context directionality (LRM or RLM) if either the
overall or the exit directionality of a given string is opposite to the context directionality.
|
String |
BidiFormatter.spanWrap(Dir dir,
String str,
boolean isHtml)
Formats a string of given directionality for use in HTML output of the context directionality,
so an opposite-directionality string is neither garbled nor garbles its surroundings.
|
BidiFormatter.BidiWrappingText |
BidiFormatter.spanWrappingText(Dir dir,
String str,
boolean isHtml)
Operates like
BidiFormatter.spanWrap(Dir, String, boolean) but only returns the text that would be
prepended and appended to str. |
String |
BidiFormatter.unicodeWrap(Dir dir,
String str,
boolean isHtml)
Formats a string of given directionality for use in plain-text output of the context
directionality, so an opposite-directionality string is neither garbled nor garbles its
surroundings.
|
BidiFormatter.BidiWrappingText |
BidiFormatter.unicodeWrappingText(Dir dir,
String str,
boolean isHtml)
Operates like
BidiFormatter.unicodeWrap(Dir, String, boolean) but only returns the text that would
be prepended and appended to str. |
| Modifier and Type | Method and Description |
|---|---|
static Expression |
BytecodeUtils.constant(Dir dir)
Returns an
Expression that evaluates to the given Dir, or null. |
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContent |
Sanitizers.cleanHtml(String value,
Dir contentDir,
Collection<? extends TagWhitelist.OptionalSafeTag> optionalSafeTags)
Normalizes the input HTML of a given directionality while preserving "safe" tags.
|
protected void |
AbstractStreamingHtmlEscaper.notifyContentDirectionality(Dir contentDir) |