com.github.jknack.handlebars
Class Context.Builder

java.lang.Object
  extended by com.github.jknack.handlebars.Context.Builder
Enclosing class:
Context

public static final class Context.Builder
extends Object

A context builder.

Since:
0.1.1
Author:
edgar.espina

Method Summary
 Context build()
          Build a context stack.
 Context.Builder combine(Map<String,Object> model)
          Combine all the map entries into the context stack.
 Context.Builder combine(String name, Object model)
          Combine the given model using the specified name.
 Context.Builder resolver(ValueResolver... resolvers)
          Set the value resolvers to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

combine

public Context.Builder combine(String name,
                               Object model)
Combine the given model using the specified name.

Parameters:
name - The variable's name. Required.
model - The model data.
Returns:
This builder.

combine

public Context.Builder combine(Map<String,Object> model)
Combine all the map entries into the context stack.

Parameters:
model - The model data.
Returns:
This builder.

resolver

public Context.Builder resolver(ValueResolver... resolvers)
Set the value resolvers to use.

Parameters:
resolvers - The value resolvers. Required.
Returns:
This builder.

build

public Context build()
Build a context stack.

Returns:
A new context stack.


Copyright © 2012. All Rights Reserved.