|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.template.soy.basetree.AbstractNode
com.google.template.soy.soytree.AbstractSoyNode
com.google.template.soy.soytree.AbstractParentSoyNode<TemplateNode>
com.google.template.soy.soytree.SoyFileNode
public class SoyFileNode
Node representing a Soy file.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.template.soy.soytree.SoyNode |
|---|
SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ExprHolderNode, SoyNode.Kind, SoyNode.LocalVarBlockNode, SoyNode.LocalVarInlineNode, SoyNode.LocalVarNode, SoyNode.LoopNode, SoyNode.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.SyntaxVersion |
| Field Summary |
|---|
| Fields inherited from class com.google.template.soy.basetree.AbstractNode |
|---|
SPACES |
| Constructor Summary | |
|---|---|
|
SoyFileNode(int id,
SoyFileKind soyFileKind,
String delpackageCmdText,
String namespaceCmdText,
List<String> aliasCmdTexts)
|
protected |
SoyFileNode(SoyFileNode orig)
Copy constructor. |
| Method Summary | |
|---|---|
SoyFileNode |
clone()
Clones this node. |
com.google.common.collect.ImmutableMap<String,String> |
getAliasToNamespaceMap()
Returns the map from aliases to namespaces for this file. |
AutoescapeMode |
getDefaultAutoescapeMode()
Returns the default autoescaping mode for contained templates. |
String |
getDelPackageName()
Returns the name of the containing delegate package, or null if none. |
String |
getFileName()
Returns this Soy file's name (null if not supplied). |
String |
getFilePath()
Returns the path to the source Soy file ("unknown" if not supplied). |
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type). |
String |
getNamespace()
Returns this Soy file's namespace, or null if syntax version V1. |
SoyFileSetNode |
getParent()
Gets this node's parent. |
SoyFileKind |
getSoyFileKind()
Returns the kind of this Soy file. |
void |
setFilePath(String filePath)
|
void |
setSourceLocation(SourceLocation srcLoc)
Sets the source location (file path and line number) for this node. |
String |
toSourceString()
Builds a Soy source string that could be the source for this node. |
| Methods inherited from class com.google.template.soy.soytree.AbstractParentSoyNode |
|---|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, needsEnvFrameDuringInterp, numChildren, removeChild, removeChild, replaceChild, replaceChild, setNeedsEnvFrameDuringInterp, toTreeString |
| Methods inherited from class com.google.template.soy.soytree.AbstractSoyNode |
|---|
getId, getSourceLocation, getSyntaxVersion, maybeSetSyntaxVersion, setId, toString |
| Methods inherited from class com.google.template.soy.basetree.AbstractNode |
|---|
getNearestAncestor, hasAncestor, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.template.soy.soytree.SoyNode.ParentSoyNode |
|---|
needsEnvFrameDuringInterp, setNeedsEnvFrameDuringInterp |
| Methods inherited from interface com.google.template.soy.soytree.SoyNode |
|---|
getId, getSourceLocation, getSyntaxVersion, setId |
| Methods inherited from interface com.google.template.soy.basetree.ParentNode |
|---|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild |
| Methods inherited from interface com.google.template.soy.basetree.Node |
|---|
getNearestAncestor, hasAncestor, setParent, toTreeString |
| Constructor Detail |
|---|
public SoyFileNode(int id,
SoyFileKind soyFileKind,
@Nullable
String delpackageCmdText,
@Nullable
String namespaceCmdText,
@Nullable
List<String> aliasCmdTexts)
throws SoySyntaxException
id - The id for this node.soyFileKind - The kind of this Soy file.delpackageCmdText - This Soy file's delegate package, or null if none.namespaceCmdText - This Soy file's namespace and attributes. Nullable for backwards
compatibility only.aliasCmdTexts - The command texts of the 'alias' declarations. Allowed to be null.
SoySyntaxException - If a syntax error is found.protected SoyFileNode(SoyFileNode orig)
orig - The node to copy.| Method Detail |
|---|
public SoyNode.Kind getKind()
SoyNode
getKind in interface SoyNodepublic SoyFileKind getSoyFileKind()
@Nullable public String getDelPackageName()
@Nullable public String getNamespace()
public AutoescapeMode getDefaultAutoescapeMode()
public com.google.common.collect.ImmutableMap<String,String> getAliasToNamespaceMap()
public void setSourceLocation(SourceLocation srcLoc)
SoyNode
setSourceLocation in interface SoyNodesetSourceLocation in class AbstractSoyNodesrcLoc - The source location for this node.public void setFilePath(String filePath)
filePath - The path to the source Soy file.public String getFilePath()
@Nullable public String getFileName()
public String toSourceString()
Node
toSourceString in interface Nodepublic SoyFileSetNode getParent()
Node
getParent in interface NodegetParent in interface SoyNodegetParent in class AbstractSoyNodepublic SoyFileNode clone()
Node
clone in interface Nodeclone in interface SoyNodeclone in class AbstractSoyNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||