ST. Contains all the bytecode instructions,
string table, bytecode address to source code map, and other bookkeeping
info. It's the implementation of an ST you might say. All instances
of the same template share a single implementation (ST#impl field).
| Modifier and Type | Field and Description |
|---|---|
| public CommonTree | ast
How do we interpret syntax of template? |
| public int | |
| public Map | |
| public boolean | |
| public List | implicitlyDefinedTemplates
A list of all regions and subtemplates. |
| public byte[] | |
| public boolean | |
| public boolean | isRegion
Does this template come from a |
| public String | |
| public STGroup | nativeGroup
The group that physically defines this |
| public int | |
| public String | prefix
Every template knows where it is relative to the group that loaded it. |
| public ST. | regionDefType
If someone refs
is defined, but you can overwrite this def by defining your own. |
| public Interval[] | |
| public String[] | |
| public String | template
The original, immutable pattern (not really used again after initial "compilation"). |
| public Token | templateDefStartToken
The token that begins template definition; could be |
| public TokenStream | tokens
Overall token stream for template (debug only). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addArg(FormalArgument a)
Used by |
| public void | |
| public CompiledST | Returns: A copy of the currentCompiledST instance. The copy is a
shallow copy, with the exception of the formalArguments field
which is also cloned.Overrides java. CompiledST for an ST instance allows
ST#add to be called safely during interpretation for templates
that do not contain formal arguments.
|
| public void | |
| public void | |
| public void | |
| public String | |
| public void | |
| public Interval | |
| public String | |
| public String |
| ast | back to summary |
|---|---|
| public CommonTree ast How do we interpret syntax of template? (debug only) | |
| codeSize | back to summary |
|---|---|
| public int codeSize | |
| formalArguments | back to summary |
|---|---|
| public Map<String, FormalArgument> formalArguments | |
| hasFormalArgs | back to summary |
|---|---|
| public boolean hasFormalArgs | |
| implicitlyDefinedTemplates | back to summary |
|---|---|
| public List<CompiledST> implicitlyDefinedTemplates A list of all regions and subtemplates. | |
| instrs | back to summary |
|---|---|
| public byte[] instrs | |
| isAnonSubtemplate | back to summary |
|---|---|
| public boolean isAnonSubtemplate | |
| isRegion | back to summary |
|---|---|
| public boolean isRegion Does this template come from a | |
| name | back to summary |
|---|---|
| public String name | |
| nativeGroup | back to summary |
|---|---|
| public STGroup nativeGroup The group that physically defines this | |
| numberOfArgsWithDefaultValues | back to summary |
|---|---|
| public int numberOfArgsWithDefaultValues | |
| prefix | back to summary |
|---|---|
| public String prefix Every template knows where it is relative to the group that loaded it.
The prefix is the relative path from the root. This has nothing to do with the outer filesystem path to the group dir or group file. We set this as we load/compile the template.
Always ends with | |
| regionDefType | back to summary |
|---|---|
| public ST. If someone refs
is defined, but you can overwrite this def by defining your own. We need
to prevent more than one manual def though. Between this var and
| |
| sourceMap | back to summary |
|---|---|
| public Interval[] sourceMap | |
| strings | back to summary |
|---|---|
| public String[] strings | |
| template | back to summary |
|---|---|
| public String template The original, immutable pattern (not really used again after initial "compilation"). Useful for debugging. Even for subtemplates, this is entire overall template. | |
| templateDefStartToken | back to summary |
|---|---|
| public Token templateDefStartToken The token that begins template definition; could be | |
| tokens | back to summary |
|---|---|
| public TokenStream tokens Overall token stream for template (debug only). | |
| CompiledST | back to summary |
|---|---|
| public CompiledST() | |
| addArg | back to summary |
|---|---|
| public void addArg(FormalArgument a) Used by | |
| addImplicitlyDefinedTemplate | back to summary |
|---|---|
| public void addImplicitlyDefinedTemplate(CompiledST sub) | |
| clone | back to summary |
|---|---|
| public CompiledST clone() throws CloneNotSupportedException Overrides java. Cloning the
| |
| defineArgDefaultValueTemplates | back to summary |
|---|---|
| public void defineArgDefaultValueTemplates(STGroup group) | |
| defineFormalArgs | back to summary |
|---|---|
| public void defineFormalArgs(List<FormalArgument> args) | |
| defineImplicitlyDefinedTemplates | back to summary |
|---|---|
| public void defineImplicitlyDefinedTemplates(STGroup group) | |
| disasm | back to summary |
|---|---|
| public String disasm() | |
| dump | back to summary |
|---|---|
| public void dump() | |
| getTemplateRange | back to summary |
|---|---|
| public Interval getTemplateRange() | |
| getTemplateSource | back to summary |
|---|---|
| public String getTemplateSource() | |
| instrs | back to summary |
|---|---|
| public String instrs() | |