| Package | Description |
|---|---|
| com.google.template.soy.basicdirectives |
Plugin package for basic print directives.
|
| com.google.template.soy.coredirectives |
Plugin package for core print directives.
|
| com.google.template.soy.jbcsrc.restricted |
| Modifier and Type | Method and Description |
|---|---|
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
BasicEscapeDirective.applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args)
Default implementation for
Streamable. |
| Modifier and Type | Method and Description |
|---|---|
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
EscapeHtmlDirective.applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args) |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
IdDirective.applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args) |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
NoAutoescapeDirective.applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args) |
| Modifier and Type | Class and Description |
|---|---|
class |
LocalVariable
A local variable representation.
|
class |
SoyExpression
An Expression involving a soy value.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
FieldRef.accessor()
Returns an expression that accesses this static field.
|
Expression |
FieldRef.accessor(Expression owner)
Returns an accessor that accesses this field on the given owner.
|
abstract Expression |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions.appendable()
The
LoggingAdvisingAppendable expression. |
static Expression |
SoyExpression.asBoxedList(List<SoyExpression> items)
Returns an Expression that evaluates to a list containing all the items as boxed soy values.
|
Expression |
Expression.asCheap()
Returns an equivalent expression where
isCheap() returns true. |
static Expression |
BytecodeUtils.asImmutableList(Iterable<? extends Expression> items)
Returns an expression that returns a new
ImmutableList containing the given items. |
static Expression |
BytecodeUtils.asList(Iterable<? extends Expression> items)
Returns an expression that returns a new
ArrayList containing all the given items. |
Expression |
Expression.asNonNullable()
Returns an equivalent expression where
isNonNullable() returns true. |
Expression |
Expression.asNullable() |
Expression |
SoyExpression.boxAsSoyValueProvider()
Returns an Expression of a non-null
SoyValueProvider providing this value. |
Expression |
Expression.checkedCast(Class<?> target)
Returns an expression that performs a checked cast from the current type to the target type.
|
Expression |
Expression.checkedCast(org.objectweb.asm.Type target)
Returns an expression that performs a checked cast from the current type to the target type.
|
static Expression |
BytecodeUtils.compare(int comparisonOpcode,
Expression left,
Expression right)
Compares the two primitive valued expressions using the provided comparison operation.
|
static Expression |
BytecodeUtils.compareSoyEquals(SoyExpression left,
SoyExpression right)
Compares two
SoyExpressions for equality using soy == semantics. |
static Expression |
BytecodeUtils.constant(boolean value)
Returns an
Expression that can load the given boolean constant. |
static Expression |
BytecodeUtils.constant(char value)
Returns an
Expression that can load the given char constant. |
static Expression |
BytecodeUtils.constant(Dir dir)
Returns an
Expression that evaluates to the given Dir, or null. |
static Expression |
BytecodeUtils.constant(double value)
Returns an
Expression that can load the given double constant. |
static Expression |
BytecodeUtils.constant(int value)
Returns an
Expression that can load the given int constant. |
static Expression |
BytecodeUtils.constant(long value)
Returns an
Expression that can load the given long constant. |
static Expression |
BytecodeUtils.constant(SanitizedContent.ContentKind kind)
Returns an
Expression that evaluates to the given ContentKind, or null. |
static Expression |
BytecodeUtils.constant(String value)
Returns an
Expression that can load the given String constant. |
static Expression |
BytecodeUtils.constant(String value,
ClassFieldManager manager)
Returns an
Expression that can load the given String constant. |
static Expression |
BytecodeUtils.constantNull(org.objectweb.asm.Type type)
Returns an
Expression with the given type that always returns null. |
static Expression |
BytecodeUtils.constantSanitizedContentKindAsContentKind(SanitizedContentKind kind)
Returns an
Expression that evaluates to the SanitizedContent.ContentKind value that is
equivalent to the given SanitizedContentKind, or null. |
Expression |
ConstructorRef.construct(Expression... args)
Returns an expression that constructs a new instance of
ConstructorRef.instanceClass() by calling
this constructor. |
Expression |
ConstructorRef.construct(Iterable<? extends Expression> args)
Returns an expression that constructs a new instance of
ConstructorRef.instanceClass() by calling
this constructor. |
static Expression |
BytecodeUtils.firstNonNull(Expression left,
Expression right)
Returns an expression that evaluates to
left if left is non null, and evaluates to
right otherwise. |
Expression |
JbcSrcPluginContext.getBidiGlobalDir()
Returns an expression that evaluates to the current
BidiGlobalDir |
Expression |
JbcSrcPluginContext.getDebugSoyTemplateInfo()
Returns an expression that evaluates to
true if debug tracing comments are enabled. |
Expression |
JbcSrcPluginContext.getULocale()
Returns an expression that evaluates to the current
ULocale. |
Expression |
MethodRef.invoke(Expression... args) |
Expression |
Expression.invoke(MethodRef method,
Expression... args)
A simple helper that calls through to
MethodRef.invoke(Expression...), but allows a
more natural fluent call style. |
Expression |
Expression.labelEnd(org.objectweb.asm.Label label)
Returns a new expression identical to this one but with the given label applied at the end of
the expression.
|
Expression |
Expression.labelStart(org.objectweb.asm.Label label)
Returns a new expression identical to this one but with the given label applied at the start of
the expression.
|
static Expression |
BytecodeUtils.logicalAnd(Expression... expressions)
Implements the short circuiting logical and (
&&) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.logicalAnd(List<? extends Expression> expressions)
Implements the short circuiting logical and (
&&) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.logicalNot(Expression baseExpr)
Returns an expression that evaluates to the logical negation of the given boolean valued
expression.
|
static Expression |
BytecodeUtils.logicalOr(Expression... expressions)
Implements the short circuiting logical or (
||) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.logicalOr(List<? extends Expression> expressions)
Implements the short circuiting logical or (
||) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.newLinkedHashMap(Iterable<? extends Expression> keys,
Iterable<? extends Expression> values)
Returns an expression that returns a new
LinkedHashMap containing all the given
entries. |
static Expression |
BytecodeUtils.numericConversion(Expression expr,
org.objectweb.asm.Type to)
Returns an expression that does a numeric conversion cast from the given expression to the
given type.
|
static Expression |
BytecodeUtils.ternary(Expression condition,
Expression trueBranch,
Expression falseBranch)
Returns an expression that evaluates equivalently to a java ternary expression:
condition ? left : right |
Expression |
Expression.withSourceLocation(SourceLocation location)
Returns an identical
Expression with the given source location. |
| Modifier and Type | Method and Description |
|---|---|
Expression |
FieldRef.accessor(Expression owner)
Returns an accessor that accesses this field on the given owner.
|
FieldRef |
ClassFieldManager.addStaticField(String proposedName,
Expression initializer)
Adds a private static final field and returns a reference to it.
|
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
SoyJbcSrcPrintDirective.Streamable.applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args)
Applies the directive to a
LoggingAdvisingAppendable object. |
static boolean |
Expression.areAllCheap(Expression first,
Expression... rest)
Returns true if all referenced expressions are cheap.
|
static boolean |
Expression.areAllCheap(Expression first,
Expression... rest)
Returns true if all referenced expressions are cheap.
|
static void |
Expression.checkTypes(com.google.common.collect.ImmutableList<org.objectweb.asm.Type> types,
Expression... exprs)
Checks that the given expressions are compatible with the given types.
|
static Expression |
BytecodeUtils.compare(int comparisonOpcode,
Expression left,
Expression right)
Compares the two primitive valued expressions using the provided comparison operation.
|
Expression |
ConstructorRef.construct(Expression... args)
Returns an expression that constructs a new instance of
ConstructorRef.instanceClass() by calling
this constructor. |
static SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions.create(Expression expression)
Creates an appendable that doesn't need to be closed.
|
static SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions.createCloseable(Expression expression)
Creates an appendable that needs to be closed.
|
static Expression |
BytecodeUtils.firstNonNull(Expression left,
Expression right)
Returns an expression that evaluates to
left if left is non null, and evaluates to
right otherwise. |
static SoyExpression |
SoyExpression.forBool(Expression delegate) |
static SoyExpression |
SoyExpression.forFloat(Expression delegate) |
static SoyExpression |
SoyExpression.forInt(Expression delegate) |
static SoyExpression |
SoyExpression.forLegacyObjectMap(LegacyObjectMapType mapType,
Expression delegate) |
static SoyExpression |
SoyExpression.forList(ListType listType,
Expression delegate) |
static SoyExpression |
SoyExpression.forMap(MapType mapType,
Expression delegate) |
static SoyExpression |
SoyExpression.forProto(SoyRuntimeType type,
Expression delegate) |
static SoyExpression |
SoyExpression.forSanitizedString(Expression delegate,
SanitizedContentKind kind) |
static SoyExpression |
SoyExpression.forSoyValue(SoyType type,
Expression delegate) |
static SoyExpression |
SoyExpression.forString(Expression delegate) |
Expression |
MethodRef.invoke(Expression... args) |
Expression |
Expression.invoke(MethodRef method,
Expression... args)
A simple helper that calls through to
MethodRef.invoke(Expression...), but allows a
more natural fluent call style. |
Statement |
MethodRef.invokeVoid(Expression... args) |
Statement |
Expression.invokeVoid(MethodRef method,
Expression... args)
A simple helper that calls through to
MethodRef.invokeVoid(Expression...), but allows a
more natural fluent call style. |
static Expression |
BytecodeUtils.logicalAnd(Expression... expressions)
Implements the short circuiting logical and (
&&) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.logicalNot(Expression baseExpr)
Returns an expression that evaluates to the logical negation of the given boolean valued
expression.
|
static Expression |
BytecodeUtils.logicalOr(Expression... expressions)
Implements the short circuiting logical or (
||) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.numericConversion(Expression expr,
org.objectweb.asm.Type to)
Returns an expression that does a numeric conversion cast from the given expression to the
given type.
|
Statement |
FieldRef.putInstanceField(Expression instance,
Expression value)
|
Statement |
FieldRef.putStaticField(Expression value)
|
static Statement |
Statement.returnExpression(Expression expression)
Generates a statement that returns the value produced by the given expression.
|
Statement |
LocalVariable.store(Expression expr)
Return a
Statement that stores the value of the given expression into this variable. |
Statement |
LocalVariable.store(Expression expr,
org.objectweb.asm.Label firstVarInstruction)
Return a
Statement that stores the value of the given expression into this variable. |
static Expression |
BytecodeUtils.ternary(Expression condition,
Expression trueBranch,
Expression falseBranch)
Returns an expression that evaluates equivalently to a java ternary expression:
condition ? left : right |
static Statement |
Statement.throwExpression(Expression expression)
Generates a statement that throws the throwable produced by the given expression.
|
SoyExpression |
SoyExpression.withSource(Expression expr)
Returns a new
SoyExpression with the same type but a new delegate expression. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
Expression.areAllCheap(Iterable<? extends Expression> args)
Returns true if all referenced expressions are cheap.
|
static Expression |
BytecodeUtils.asImmutableList(Iterable<? extends Expression> items)
Returns an expression that returns a new
ImmutableList containing the given items. |
static Expression |
BytecodeUtils.asList(Iterable<? extends Expression> items)
Returns an expression that returns a new
ArrayList containing all the given items. |
Expression |
ConstructorRef.construct(Iterable<? extends Expression> args)
Returns an expression that constructs a new instance of
ConstructorRef.instanceClass() by calling
this constructor. |
Statement |
MethodRef.invokeVoid(Iterable<? extends Expression> args) |
static Expression |
BytecodeUtils.logicalAnd(List<? extends Expression> expressions)
Implements the short circuiting logical and (
&&) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.logicalOr(List<? extends Expression> expressions)
Implements the short circuiting logical or (
||) operator over the list of boolean
expressions. |
static Expression |
BytecodeUtils.newLinkedHashMap(Iterable<? extends Expression> keys,
Iterable<? extends Expression> values)
Returns an expression that returns a new
LinkedHashMap containing all the given
entries. |
static Expression |
BytecodeUtils.newLinkedHashMap(Iterable<? extends Expression> keys,
Iterable<? extends Expression> values)
Returns an expression that returns a new
LinkedHashMap containing all the given
entries. |