org.peaseplate.internal.model
Class CompileContext

java.lang.Object
  extended by org.peaseplate.internal.model.CompileContext

public class CompileContext
extends java.lang.Object


Constructor Summary
CompileContext(TemplateLocator locator)
           
 
Method Summary
 void addImportedResourceKey(ResourceKey descriptor)
          Adds an imported resource key
 void addMacroBlock(MacroBlock macroBlock)
          Adds a macro block
 void addVariable(java.lang.String... names)
           
 boolean containsVariable(java.lang.String name)
           
 java.util.List<ResourceKey> getImportedResourceKeys()
          Returns an unmodifiable list of imported resource descriptors
 TemplateLocator getLocator()
          Returns the template locator
 java.util.Map<java.lang.String,MacroBlock> getMacroBlocks()
          Returns an unmodifiable map of macro blocks
 OutputStrategy getOutputStrategy()
           
 java.lang.String[] popVariables()
           
 void pushVariables()
           
 void setOutputStrategy(java.lang.Class<? extends OutputStrategy> outputStrategyClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileContext

public CompileContext(TemplateLocator locator)
Method Detail

getLocator

public TemplateLocator getLocator()
Returns the template locator

Returns:
the template locator

addImportedResourceKey

public void addImportedResourceKey(ResourceKey descriptor)
Adds an imported resource key

Parameters:
descriptor - the imported resource key

getImportedResourceKeys

public java.util.List<ResourceKey> getImportedResourceKeys()
Returns an unmodifiable list of imported resource descriptors

Returns:
an unmodifiable list of imported resource descriptors

addMacroBlock

public void addMacroBlock(MacroBlock macroBlock)
Adds a macro block

Parameters:
macroBlock - a macro block

getMacroBlocks

public java.util.Map<java.lang.String,MacroBlock> getMacroBlocks()
Returns an unmodifiable map of macro blocks

Returns:
an unmodifiable map of macro blocks

addVariable

public void addVariable(java.lang.String... names)

containsVariable

public boolean containsVariable(java.lang.String name)

pushVariables

public void pushVariables()

popVariables

public java.lang.String[] popVariables()

getOutputStrategy

public OutputStrategy getOutputStrategy()

setOutputStrategy

public void setOutputStrategy(java.lang.Class<? extends OutputStrategy> outputStrategyClass)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException


Copyright © 2008. All Rights Reserved.