org.stringtemplate.v4.compiler
Class Compiler

java.lang.Object
  extended by org.stringtemplate.v4.compiler.Compiler

public class Compiler
extends java.lang.Object

A compiler for a single template.


Field Summary
static java.util.Map<java.lang.String,java.lang.String> defaultOptionValues
           
static java.util.Map<java.lang.String,java.lang.Short> funcs
           
 STGroup group
           
static int NUM_OPTIONS
           
static java.lang.String SUBTEMPLATE_PREFIX
           
static int subtemplateCount
          Name subtemplates _sub1, _sub2, ...
static java.util.Map<java.lang.String,Interpreter.Option> supportedOptions
           
static int TEMPLATE_INITIAL_CODE_SIZE
           
 
Constructor Summary
Compiler()
           
Compiler(STGroup group)
           
 
Method Summary
 CompiledST compile(java.lang.String template)
           
 CompiledST compile(java.lang.String name, java.lang.String template)
          Compile full template with unknown formal args.
 CompiledST compile(java.lang.String srcName, java.lang.String name, java.util.List<FormalArgument> args, java.lang.String template, org.antlr.runtime.Token templateToken)
          Compile full template with respect to a list of formal args.
static CompiledST defineBlankRegion(CompiledST outermostImpl, org.antlr.runtime.Token nameToken)
           
static java.lang.String getNewSubtemplateName()
           
protected  void reportMessageAndThrowSTException(org.antlr.runtime.TokenStream tokens, org.antlr.runtime.Token templateToken, org.antlr.runtime.Parser parser, org.antlr.runtime.RecognitionException re)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBTEMPLATE_PREFIX

public static final java.lang.String SUBTEMPLATE_PREFIX
See Also:
Constant Field Values

TEMPLATE_INITIAL_CODE_SIZE

public static final int TEMPLATE_INITIAL_CODE_SIZE
See Also:
Constant Field Values

supportedOptions

public static final java.util.Map<java.lang.String,Interpreter.Option> supportedOptions

NUM_OPTIONS

public static final int NUM_OPTIONS

defaultOptionValues

public static final java.util.Map<java.lang.String,java.lang.String> defaultOptionValues

funcs

public static java.util.Map<java.lang.String,java.lang.Short> funcs

subtemplateCount

public static int subtemplateCount
Name subtemplates _sub1, _sub2, ...


group

public STGroup group
Constructor Detail

Compiler

public Compiler()

Compiler

public Compiler(STGroup group)
Method Detail

compile

public CompiledST compile(java.lang.String template)

compile

public CompiledST compile(java.lang.String name,
                          java.lang.String template)
Compile full template with unknown formal args.


compile

public CompiledST compile(java.lang.String srcName,
                          java.lang.String name,
                          java.util.List<FormalArgument> args,
                          java.lang.String template,
                          org.antlr.runtime.Token templateToken)
Compile full template with respect to a list of formal args.


defineBlankRegion

public static CompiledST defineBlankRegion(CompiledST outermostImpl,
                                           org.antlr.runtime.Token nameToken)

getNewSubtemplateName

public static java.lang.String getNewSubtemplateName()

reportMessageAndThrowSTException

protected void reportMessageAndThrowSTException(org.antlr.runtime.TokenStream tokens,
                                                org.antlr.runtime.Token templateToken,
                                                org.antlr.runtime.Parser parser,
                                                org.antlr.runtime.RecognitionException re)


Copyright © 2011. All Rights Reserved.