com.github.mustachejava.codes
Class PartialCode

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

public class PartialCode
extends DefaultCode


Field Summary
protected  java.lang.String extension
           
protected  Mustache partial
           
 
Fields inherited from class com.github.mustachejava.codes.DefaultCode
appended, inited, logger, mustache, name, notfound, oh, returnThis, tc, type, wrapper
 
Constructor Summary
protected PartialCode(TemplateContext tc, DefaultMustacheFactory cf, Mustache mustache, java.lang.String type, java.lang.String variable)
           
  PartialCode(TemplateContext tc, DefaultMustacheFactory cf, java.lang.String variable)
           
 
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.
protected  java.io.Writer execute(java.io.Writer writer, java.lang.Object scope, java.lang.Object[] scopes)
           
 Code[] getCodes()
           
 void init()
           
protected  java.io.Writer partialExecute(java.io.Writer writer, java.lang.Object[] scopes)
           
 void setCodes(Code[] newcodes)
           
 
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
 

Field Detail

partial

protected Mustache partial

extension

protected final java.lang.String extension
Constructor Detail

PartialCode

protected PartialCode(TemplateContext tc,
                      DefaultMustacheFactory cf,
                      Mustache mustache,
                      java.lang.String type,
                      java.lang.String variable)

PartialCode

public PartialCode(TemplateContext tc,
                   DefaultMustacheFactory cf,
                   java.lang.String variable)
Method Detail

getCodes

public Code[] getCodes()
Specified by:
getCodes in interface Code
Overrides:
getCodes in class DefaultCode

setCodes

public void setCodes(Code[] newcodes)
Specified by:
setCodes in interface Code
Overrides:
setCodes in class DefaultCode

execute

public java.io.Writer execute(java.io.Writer writer,
                              java.lang.Object[] scopes)
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 DefaultCode
Parameters:
writer - The writer to write the output to
scopes - The scopes to evaluate the embedded names against.

init

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

partialExecute

protected java.io.Writer partialExecute(java.io.Writer writer,
                                        java.lang.Object[] scopes)

execute

protected java.io.Writer execute(java.io.Writer writer,
                                 java.lang.Object scope,
                                 java.lang.Object[] scopes)


Copyright © 2012. All Rights Reserved.