com.github.mustachejava.codes
Class ExtendCode

java.lang.Object
  extended by com.github.mustachejava.codes.DefaultCode
      extended by com.github.mustachejava.codes.PartialCode
          extended by com.github.mustachejava.codes.ExtendCode
All Implemented Interfaces:
Code

public class ExtendCode
extends PartialCode

Extending a template.

User: sam Date: 11/27/11 Time: 10:39 AM


Field Summary
 
Fields inherited from class com.github.mustachejava.codes.PartialCode
extension, partial
 
Fields inherited from class com.github.mustachejava.codes.DefaultCode
appended, inited, logger, mustache, name, notfound, oh, returnThis, tc, type, wrapper
 
Constructor Summary
ExtendCode(TemplateContext tc, DefaultMustacheFactory mf, Mustache codes, java.lang.String name)
           
 
Method Summary
 java.io.Writer execute(java.io.Writer writer, java.lang.Object[] scopes)
          The default behavior is to run the codes and append the captured text.
 void init()
           
 
Methods inherited from class com.github.mustachejava.codes.PartialCode
execute, getCodes, partialExecute, setCodes
 
Methods inherited from class com.github.mustachejava.codes.DefaultCode
addScope, append, appendText, execute, get, identity, runCodes, runIdentity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendCode

public ExtendCode(TemplateContext tc,
                  DefaultMustacheFactory mf,
                  Mustache codes,
                  java.lang.String name)
           throws MustacheException
Throws:
MustacheException
Method Detail

execute

public java.io.Writer execute(java.io.Writer writer,
                              java.lang.Object[] scopes)
                       throws MustacheException
Description copied from class: DefaultCode
The default behavior is to run the codes and append the captured text.

Specified by:
execute in interface Code
Overrides:
execute in class PartialCode
Parameters:
writer - The writer to write the output to
scopes - The scopes to evaluate the embedded names against.
Throws:
MustacheException

init

public void init()
Specified by:
init in interface Code
Overrides:
init in class PartialCode


Copyright © 2012. All Rights Reserved.