Package com.github.jknack.handlebars
Class Options.Builder
- java.lang.Object
-
- com.github.jknack.handlebars.Options.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder(Handlebars handlebars, java.lang.String helperName, TagType tagType, Context context, Template fn)
Creates a newOptions.Builder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Options
build()
Build a newOptions
object.Options.Builder
setBlockParams(java.util.List<java.lang.String> blockParams)
Set the options block params.Options.Builder
setHash(java.util.Map<java.lang.String,java.lang.Object> hash)
Set the options hash.Options.Builder
setInverse(Template inverse)
Set the inverse template.Options.Builder
setParams(java.lang.Object[] params)
Set the options parameters.Options.Builder
setWriter(java.io.Writer writer)
Set a writer, useful to improve performance.
-
-
-
Constructor Detail
-
Builder
public Builder(Handlebars handlebars, java.lang.String helperName, TagType tagType, Context context, Template fn)
Creates a newOptions.Builder
.- Parameters:
handlebars
- A handlebars object. Required.helperName
- The name of the helper. Required.tagType
- TheTagType
from where the helper was called.context
- A context object. Required.fn
- A template object. Required.
-
-
Method Detail
-
setHash
public Options.Builder setHash(java.util.Map<java.lang.String,java.lang.Object> hash)
Set the options hash.- Parameters:
hash
- A hash table. Required.- Returns:
- This builder.
-
setBlockParams
public Options.Builder setBlockParams(java.util.List<java.lang.String> blockParams)
Set the options block params.- Parameters:
blockParams
- A block params. Required.- Returns:
- This builder.
-
setInverse
public Options.Builder setInverse(Template inverse)
Set the inverse template.- Parameters:
inverse
- Inverse template. Required.- Returns:
- This builder.
-
setParams
public Options.Builder setParams(java.lang.Object[] params)
Set the options parameters.- Parameters:
params
- A parameters list. Required.- Returns:
- This builder.
-
setWriter
public Options.Builder setWriter(java.io.Writer writer)
Set a writer, useful to improve performance.- Parameters:
writer
- A writer. Required.- Returns:
- This builder.
-
-