Package | Description |
---|---|
com.github.jknack.handlebars | |
com.github.jknack.handlebars.internal | |
com.github.jknack.handlebars.internal.path |
Modifier and Type | Field and Description |
---|---|
Context |
Options.context
The current context.
|
protected Context |
Context.extendedContext
Additional, data can be stored here.
|
protected Context |
Context.parent
The parent context.
|
Modifier and Type | Method and Description |
---|---|
Context |
Context.Builder.build()
Build a context stack.
|
Context |
Context.combine(Map<String,?> model)
Insert all the attributes in the context-stack.
|
Context |
Context.combine(String name,
Object model)
Insert a new attribute in the context-stack.
|
static Context |
Context.copy(Context context,
Object model)
Creates a new context but keep the
data attribute. |
Context |
Context.data(Map<String,?> attributes)
Store the map in the data storage.
|
Context |
Context.data(String name,
Object value)
Set an attribute in the data storage.
|
static Context |
Context.newBlockParamContext(Context parent,
List<String> names,
List<Object> values)
Creates a new block param context.
|
protected Context |
Context.newChildContext(Object model)
Creates an empty/default context.
|
static Context |
Context.newContext(Context parent,
Object model)
Creates a new child context.
|
static Context |
Context.newContext(Object model)
Creates a new root context.
|
static Context |
Context.newPartialContext(Context ctx,
String scope,
Map<String,Object> hash)
Creates a new partial context.
|
Context |
Context.parent()
The parent context or null.
|
Context |
Options.wrap(Object model)
Creates a
Context from the given model. |
Modifier and Type | Method and Description |
---|---|
String |
Template.apply(Context context)
Merge the template tree using the given context.
|
void |
Template.apply(Context context,
Writer writer)
Merge the template tree using the given context.
|
CharSequence |
Options.apply(Template template,
Context context)
Apply the given template to the provided context.
|
CharSequence |
Options.apply(Template template,
Context context,
List<Object> blockParams)
Apply the given template to the provided context.
|
static Context |
Context.copy(Context context,
Object model)
Creates a new context but keep the
data attribute. |
Object |
PathExpression.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain)
Eval the expression and resolve it to a value.
|
CharSequence |
Options.fn(Context context)
Apply the
Options.fn template using the provided context. |
CharSequence |
Options.inverse(Context context)
Apply the
Options.inverse template using the provided context. |
static Context |
Context.newBlockParamContext(Context parent,
List<String> names,
List<Object> values)
Creates a new block param context.
|
static Context.Builder |
Context.newBuilder(Context parent,
Object model)
Start a new context builder.
|
static Context |
Context.newContext(Context parent,
Object model)
Creates a new child context.
|
static Context |
Context.newPartialContext(Context ctx,
String scope,
Map<String,Object> hash)
Creates a new partial context.
|
Object |
PathExpression.Chain.next(ValueResolver resolver,
Context context,
Object data)
Call the next resolver in the chain or finish the call.
|
Constructor and Description |
---|
Builder(Handlebars handlebars,
String helperName,
TagType tagType,
Context context,
Template fn)
Creates a new
Options.Builder . |
Options(Handlebars handlebars,
String helperName,
TagType tagType,
Context context,
Template fn,
Template inverse,
Object[] params,
Map<String,Object> hash,
List<String> blockParams)
Creates a new Handlebars
Options . |
Options(Handlebars handlebars,
String helperName,
TagType tagType,
Context context,
Template fn,
Template inverse,
Object[] params,
Map<String,Object> hash,
List<String> blockParams,
Writer writer)
Creates a new Handlebars
Options . |
Modifier and Type | Method and Description |
---|---|
void |
BlockDecorator.after(Context context,
Writer writer) |
Object |
VarParam.apply(Context context) |
Object |
StrParam.apply(Context context) |
Object |
RefParam.apply(Context context) |
Object |
Param.apply(Context context)
Apply the given param to context.
|
Object |
DefParam.apply(Context context) |
void |
VarDecorator.apply(Context context,
Writer writer) |
void |
BlockDecorator.apply(Context context,
Writer writer) |
void |
VarDecorator.before(Context context,
Writer writer) |
void |
BlockDecorator.before(Context context,
Writer writer) |
protected void |
PartialBlockForwardingTemplate.merge(Context context,
Writer writer)
Merge a child template into the writer.
|
Modifier and Type | Method and Description |
---|---|
Object |
ThisPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Object |
ResolveThisPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Object |
ResolveParentPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Object |
PropertyPath.eval(ValueResolver resolver,
Context ctx,
Object data,
PathExpression.Chain chain) |
Object |
ParentPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Object |
IndexedPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Object |
DataPath.eval(ValueResolver resolver,
Context context,
Object data,
PathExpression.Chain chain) |
Copyright © 2021. All rights reserved.