public static interface SoyJbcSrcPrintDirective.Streamable extends SoyJbcSrcPrintDirective
Streaming print directives work by wrapping the LoggingAdvisingAppendable object.
This means that the value is not passed directly to the directive, instead the value is represented by a sequence of append operations on the wrapped appendable object. It is further more expected that all
non-append operations (e.g. LoggingAdvisingAppendable.enterLoggableElement(com.google.template.soy.data.LogStatement)) are
simply proxied through to the underlying object.
NOTE: any streamable print directive must also support a non-streaming option. The compiler will prefer to use the streaming option but it will not always be possible or necessary (for example, if the content is a compile time constant then we may avoid streaming it, or if this print directive is combined with non-streamable print directives then we will not be able to stream.
| Modifier and Type | Interface and Description |
|---|---|
static class |
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions
A simple object that represents an
Expression for a LoggingAdvisingAppendable
which will apply a given print directive, as well as additional options for the behavior of
the print directive. |
SoyJbcSrcPrintDirective.Streamable| Modifier and Type | Method and Description |
|---|---|
SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions |
applyForJbcSrcStreaming(JbcSrcPluginContext context,
Expression delegateAppendable,
List<SoyExpression> args)
Applies the directive to a
LoggingAdvisingAppendable object. |
applyForJbcSrcgetName, getValidArgsSizes, shouldCancelAutoescapeSoyJbcSrcPrintDirective.Streamable.AppendableAndOptions applyForJbcSrcStreaming(JbcSrcPluginContext context, Expression delegateAppendable, List<SoyExpression> args)
LoggingAdvisingAppendable object.context - The rendering context object.delegateAppendable - The delegate appendableargs - The print directive arguments.SoyJbcSrcPrintDirective.Streamable.AppendableAndOptions for the directive.