|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.stringtemplate.v4.compiler.CompiledST
public class CompiledST
The result of compiling an 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 (impl field).
| Field Summary | |
|---|---|
org.antlr.runtime.tree.CommonTree |
ast
How do we interpret syntax of template? (debug only) |
int |
codeSize
|
java.util.Map<java.lang.String,FormalArgument> |
formalArguments
|
boolean |
hasFormalArgs
|
java.util.List<CompiledST> |
implicitlyDefinedTemplates
A list of all regions and subtemplates |
byte[] |
instrs
|
boolean |
isAnonSubtemplate
|
boolean |
isRegion
Does this template come from a <@region>...<@end> embedded in another template? |
java.lang.String |
name
|
STGroup |
nativeGroup
The group that physically defines this ST definition. |
int |
numberOfArgsWithDefaultValues
|
ST.RegionType |
regionDefType
If someone refs <@r()> in template t, an implicit |
Interval[] |
sourceMap
|
java.lang.String[] |
strings
|
java.lang.String |
template
The original, immutable pattern (not really used again after initial "compilation"). |
org.antlr.runtime.Token |
templateDefStartToken
The token that begins template definition; could be <@r> of region. |
org.antlr.runtime.TokenStream |
tokens
Overall token stream for template (debug only) |
| Constructor Summary | |
|---|---|
CompiledST()
|
|
| Method Summary | |
|---|---|
void |
addArg(FormalArgument a)
Used by ST.add() to add args one by one w/o turning on full formal args definition signal |
void |
addImplicitlyDefinedTemplate(CompiledST sub)
|
void |
defineArgDefaultValueTemplates(STGroup group)
|
void |
defineFormalArgs(java.util.List<FormalArgument> args)
|
void |
defineImplicitlyDefinedTemplates(STGroup group)
|
java.lang.String |
disasm()
|
void |
dump()
|
Interval |
getTemplateRange()
|
java.lang.String |
getTemplateSource()
|
java.lang.String |
instrs()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String name
public java.lang.String template
public org.antlr.runtime.Token templateDefStartToken
public org.antlr.runtime.TokenStream tokens
public org.antlr.runtime.tree.CommonTree ast
public java.util.Map<java.lang.String,FormalArgument> formalArguments
public boolean hasFormalArgs
public int numberOfArgsWithDefaultValues
public java.util.List<CompiledST> implicitlyDefinedTemplates
public STGroup nativeGroup
public boolean isRegion
public ST.RegionType regionDefType
public boolean isAnonSubtemplate
public java.lang.String[] strings
public byte[] instrs
public int codeSize
public Interval[] sourceMap
| Constructor Detail |
|---|
public CompiledST()
| Method Detail |
|---|
public void addImplicitlyDefinedTemplate(CompiledST sub)
public void defineArgDefaultValueTemplates(STGroup group)
public void defineFormalArgs(java.util.List<FormalArgument> args)
public void addArg(FormalArgument a)
public void defineImplicitlyDefinedTemplates(STGroup group)
public java.lang.String getTemplateSource()
public Interval getTemplateRange()
public java.lang.String instrs()
public void dump()
public java.lang.String disasm()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||