public abstract class LoggingAdvisingAppendable extends Object implements AdvisingAppendable
AdvisingAppendable that can also process log statements.
NOTE: all the logging functionality is currently stubbed out.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
LoggingAdvisingAppendable.BufferingAppendable
A
LoggingAdvisingAppendable that renders to a string builder. |
| Constructor and Description |
|---|
LoggingAdvisingAppendable() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsoftLimitReachedpublic static LoggingAdvisingAppendable.BufferingAppendable buffering()
LoggingAdvisingAppendable.BufferingAppendable that renders everything to a buffer that can be accessed
via LoggingAdvisingAppendable.BufferingAppendable.toString() or LoggingAdvisingAppendable.BufferingAppendable.getAndClearBuffer()public static LoggingAdvisingAppendable delegating(Appendable appendable)
LoggingAdvisingAppendable that delegates to an Appendablepublic static LoggingAdvisingAppendable stringCoercing(LoggingAdvisingAppendable delegate)
append(java.lang.CharSequence) calls. This has the effect of coercing
the content to a string by dropping all the strict content directives.public abstract LoggingAdvisingAppendable append(CharSequence csq) throws IOException
append in interface AdvisingAppendableappend in interface AppendableIOExceptionpublic abstract LoggingAdvisingAppendable append(CharSequence csq, int start, int end) throws IOException
append in interface AdvisingAppendableappend in interface AppendableIOExceptionpublic abstract LoggingAdvisingAppendable append(char c) throws IOException
append in interface AdvisingAppendableappend in interface AppendableIOExceptionpublic abstract LoggingAdvisingAppendable enterLoggableElement(LogStatement statement)
public abstract LoggingAdvisingAppendable exitLoggableElement()
public final LoggingAdvisingAppendable setSanitizedContentKind(SanitizedContent.ContentKind kind) throws IOException
append(java.lang.CharSequence) commands should be
considered to be content of the given kind that has already been sanitized.
Calls after the first call to this are ignored. In the case of an appendable's content kind changing, we trust that the autoescaper has inserted the correct escape directives, so we do not need to track this in the appendable.
IOExceptionprotected void notifyContentKind(SanitizedContent.ContentKind kind) throws IOException
IOException#setSanitizedContentKind(ContentKind)@Nullable public final SanitizedContent.ContentKind getSantizedContentKind()
#setSanitizedContentKind(ContentKind)public final LoggingAdvisingAppendable setSanitizedContentDirectionality(@Nullable Dir contentDir) throws IOException
append(java.lang.CharSequence) commands should be
considered to be content of the given directionality that has already been sanitized.
Calls after the first call to this are ignored.
IOExceptionprotected void notifyContentDirectionality(Dir contentDir) throws IOException
IOExceptionsetSanitizedContentDirectionality(Dir)@Nullable public final Dir getSanitizedContentDirectionality()
setSanitizedContentDirectionality(Dir)public abstract LoggingAdvisingAppendable appendLoggingFunctionInvocation(LoggingFunctionInvocation funCall, com.google.common.collect.ImmutableList<com.google.common.base.Function<String,String>> escapers) throws IOException
TODO(lukes): come up with a better interface than Function. Maybe Escaper?
funCall - The function invocationescapers - The escapers to apply to the result. NOTE: this should be SoyJavaPrintDirective
or similar but that would cause cycles between soy.data and soy.shared.restrictedIOException