| Package | Description |
|---|---|
| com.google.template.soy |
Root package with main API entry point and
Guice module.
|
| com.google.template.soy.conformance | |
| com.google.template.soy.error | |
| com.google.template.soy.incrementaldomsrc | |
| com.google.template.soy.jbcsrc | |
| com.google.template.soy.jssrc.internal | |
| com.google.template.soy.msgs |
Support for message translation (i.e. localization).
|
| com.google.template.soy.msgs.internal | |
| com.google.template.soy.parsepasses.contextautoesc |
A pass that modifies a SoyFile to add escape directives where necessary based on a contextual
examination of template
print commands. |
| com.google.template.soy.passes | |
| com.google.template.soy.pysrc.internal | |
| com.google.template.soy.soyparse | |
| com.google.template.soy.soytree |
Soy parse tree.
|
| com.google.template.soy.types |
Classes that represent Soy parameter type declarations.
|
| com.google.template.soy.xliffmsgplugin |
Message plugin for the
XLIFF file format.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SoyFileSetParser.Builder |
SoyFileSetParser.Builder.setErrorReporter(ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
SoyConformance.check(SoyFileNode file,
ErrorReporter errorReporter)
Performs the overall check.
|
| Modifier and Type | Method and Description |
|---|---|
static ErrorReporter |
ErrorReporter.create(Map<String,SoyFileSupplier> filePathsToSuppliers)
Creates a new ErrorReporter which can create source snippets from the given files.
|
static ErrorReporter |
ErrorReporter.createForTest()
Creates a new ErrorReporter suitable for asserting on messages in tests.
|
static ErrorReporter |
ErrorReporter.explodeOnErrorsAndIgnoreWarnings()
Returns an ErrorReporter that throws assertion error on every error but ignores warnings.
|
static ErrorReporter |
ErrorReporter.exploding()
Returns an ErrorReporter that throws an assertion error on every error and warning.
|
| Modifier and Type | Method and Description |
|---|---|
GenIncrementalDomExprsVisitor |
GenIncrementalDomExprsVisitor.GenIncrementalDomExprsVisitorFactory.create(TranslationContext translationContext,
TemplateAliases templateAliases,
ErrorReporter errorReporter) |
void |
IncrementalDomSrcMain.genJsFiles(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyIncrementalDomSrcOptions jsSrcOptions,
String outputPathFormat,
ErrorReporter errorReporter)
Generates Incremental DOM JS source files given a Soy parse tree, an options object, an
optional bundle of translated messages, and information on where to put the output files.
|
List<String> |
IncrementalDomSrcMain.genJsSrc(SoyFileSetNode soyTree,
TemplateRegistry registry,
SoyIncrementalDomSrcOptions options,
ErrorReporter errorReporter)
Generates Incremental DOM JS source code given a Soy parse tree, an options object, and an
optional bundle of translated messages.
|
| Constructor and Description |
|---|
GenIncrementalDomExprsVisitor(SoyJsSrcOptions options,
com.google.template.soy.incrementaldomsrc.IncrementalDomGenCallCodeUtils genCallCodeUtils,
com.google.template.soy.incrementaldomsrc.IsComputableAsIncrementalDomExprsVisitor isComputableAsJsExprsVisitor,
GenIncrementalDomExprsVisitor.GenIncrementalDomExprsVisitorFactory genIncrementalDomExprsVisitorFactory,
TranslationContext translationContext,
ErrorReporter errorReporter,
TemplateAliases templateAliases) |
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.base.Optional<CompiledTemplates> |
BytecodeCompiler.compile(TemplateRegistry registry,
boolean developmentMode,
ErrorReporter reporter)
Compiles all the templates in the given registry.
|
static void |
BytecodeCompiler.compileToJar(TemplateRegistry registry,
ErrorReporter reporter,
com.google.common.io.ByteSink sink)
Compiles all the templates in the given registry to a jar file written to the given output
stream.
|
| Modifier and Type | Field and Description |
|---|---|
protected ErrorReporter |
GenJsCodeVisitor.errorReporter |
| Modifier and Type | Method and Description |
|---|---|
GenJsExprsVisitor |
GenJsExprsVisitor.GenJsExprsVisitorFactory.create(TranslationContext translationContext,
TemplateAliases templateAliases,
ErrorReporter errorReporter) |
CodeChunk.WithValue |
GenCallCodeUtils.gen(CallNode callNode,
TemplateAliases templateAliases,
TranslationContext translationContext,
ErrorReporter errorReporter)
Generates the JS expression for a given call.
|
List<String> |
GenJsCodeVisitor.gen(SoyFileSetNode node,
TemplateRegistry registry,
ErrorReporter errorReporter) |
void |
JsSrcMain.genJsFiles(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
String locale,
SoyMsgBundle msgBundle,
String outputPathFormat,
String inputPathsPrefix,
ErrorReporter errorReporter)
Generates JS source files given a Soy parse tree, an options object, an optional bundle of
translated messages, and information on where to put the output files.
|
List<String> |
JsSrcMain.genJsSrc(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle,
ErrorReporter errorReporter)
Generates JS source code given a Soy parse tree, an options object, and an optional bundle of
translated messages.
|
| Constructor and Description |
|---|
GenJsCodeVisitorAssistantForMsgs(GenJsCodeVisitor master,
SoyJsSrcOptions jsSrcOptions,
GenCallCodeUtils genCallCodeUtils,
IsComputableAsJsExprsVisitor isComputableAsJsExprsVisitor,
TemplateAliases functionAliases,
GenJsExprsVisitor genJsExprsVisitor,
TranslationContext translationContext,
ErrorReporter errorReporter) |
GenJsExprsVisitor(SoyJsSrcOptions options,
GenCallCodeUtils genCallCodeUtils,
IsComputableAsJsExprsVisitor isComputableAsJsExprsVisitor,
GenJsExprsVisitor.GenJsExprsVisitorFactory genJsExprsVisitorFactory,
TranslationContext translationContext,
ErrorReporter errorReporter,
TemplateAliases templateAliases) |
TranslateExprNodeVisitor(SoyJsSrcOptions jsSrcOptions,
TranslationContext translationContext,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
SoyMsgPlugin.generateExtractedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
ErrorReporter errorReporter)
Builds the content of an extracted messages file (source messages to be translated) from a
given message bundle object containing messages extracted from source files.
|
void |
SoyMsgBundleHandler.writeExtractedMsgs(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
com.google.common.io.ByteSink output,
ErrorReporter errorReporter)
Generates extracted messages (source messages to be translated) from a given message bundle,
and writes it out.
|
| Constructor and Description |
|---|
InsertMsgsVisitor(SoyMsgBundle msgBundle,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
List<TemplateNode> |
ContextualAutoescaper.rewrite(SoyFileSetNode fileSet,
ErrorReporter errorReporter)
Rewrites the given Soy files so that dynamic output is properly escaped according to the
context in which it appears.
|
| Modifier and Type | Method and Description |
|---|---|
PassManager.Builder |
PassManager.Builder.setErrorReporter(ErrorReporter errorReporter) |
| Constructor and Description |
|---|
HtmlRewritePass(ErrorReporter errorReporter) |
ResolveNamesVisitor(ErrorReporter errorReporter) |
StrictDepsVisitor(TemplateRegistry templateRegistry,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
GenPyExprsVisitor |
GenPyExprsVisitor.GenPyExprsVisitorFactory.create(com.google.template.soy.pysrc.internal.LocalVariableStack localVarExprs,
ErrorReporter errorReporter) |
void |
PySrcMain.genPyFiles(SoyFileSetNode soyTree,
SoyPySrcOptions pySrcOptions,
String outputPathFormat,
String inputPathsPrefix,
ErrorReporter errorReporter)
Generates Python source files given a Soy parse tree, an options object, and information on
where to put the output files.
|
| Modifier and Type | Method and Description |
|---|---|
static PluginResolver |
PluginResolver.nullResolver(PluginResolver.Mode mode,
ErrorReporter reporter)
Returns an empty resolver.
|
static ExprNode |
SoyFileParser.parseExpression(String exprText,
PluginResolver resolver,
ErrorReporter errorReporter)
Attempts to parse the given input as a Soy expression.
|
static SoyType |
SoyFileParser.parseType(String typeText,
SoyTypeRegistry typeRegistry,
String filePath,
ErrorReporter errorReporter)
Attempts to parse the given input as a type node.
|
| Constructor and Description |
|---|
PluginResolver(PluginResolver.Mode mode,
com.google.common.collect.ImmutableMap<String,? extends SoyPrintDirective> printDirectives,
com.google.common.collect.ImmutableMap<String,? extends SoyFunction> functions,
ErrorReporter reporter) |
SoyFileParser(SoyTypeRegistry typeRegistry,
PluginResolver pluginResolver,
IdGenerator nodeIdGen,
Reader input,
SoyFileKind soyFileKind,
String filePath,
ErrorReporter errorReporter,
com.google.common.collect.ImmutableSet<String> experimentalFeatures)
Constructor that takes a reader object providing the input.
|
| Modifier and Type | Field and Description |
|---|---|
protected ErrorReporter |
TemplateNodeBuilder.errorReporter
For reporting parse errors.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MsgNode.calculateSubstitutionInfo(ErrorReporter reporter) |
static MsgHtmlTagNode |
MsgHtmlTagNode.fromNode(int id,
HtmlTagNode tagNode,
ErrorReporter errorReporter)
Creates a
MsgHtmlTagNode from a HtmlTagNode. |
static List<String> |
MsgSubstUnitBaseVarNameUtils.genNoncollidingBaseNamesForExprs(List<ExprNode> exprNodes,
String fallbackBaseName,
ErrorReporter errorReporter)
Generates base names for all the expressions in a list, where for each expression, we use the
shortest candidate base name that does not collide with any of the candidate base names
generated from other expressions in the list.
|
static void |
CommandTagAttribute.removeDuplicatesAndReportErrors(Iterable<CommandTagAttribute> attrs,
ErrorReporter errorReporter)
Identifies duplicate attributes, reports an error for each one, and removes them from the
Iterable. |
SanitizedContentKind |
CommandTagAttribute.valueAsContentKind(ErrorReporter errorReporter) |
ExprNode |
CommandTagAttribute.valueAsExpr(ErrorReporter reporter)
Returns the value as an expression.
|
int |
CommandTagAttribute.valueAsInteger(ErrorReporter errorReporter,
int defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
SoyType |
SoyTypeRegistry.getOrCreateType(TypeNode node,
ErrorReporter errorReporter)
Converts a TypeNode into a SoyType.
|
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
XliffMsgPlugin.generateExtractedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
ErrorReporter errorReporter) |