Package com.blazebit.persistence.spi
Class TemplateRenderer.Context
java.lang.Object
com.blazebit.persistence.spi.TemplateRenderer.Context
- Enclosing class:
- TemplateRenderer
A context for a template renderer that supports binding function arguments or plain strings as values for placeholders.
-
Constructor Summary
ConstructorDescriptionContext
(TemplateRenderer template, FunctionRenderContext context) Constructs a context for a template renderer and a render context. -
Method Summary
Modifier and TypeMethodDescriptionaddArgument
(int index) Uses the value of the argument at the given index as value to be bound to the current parameter.addParameter
(String chunk) Uses the given chunk as value to be bound to the current parameter.void
build()
Binds the values to the underlyingFunctionRenderContext
.
-
Constructor Details
-
Context
Constructs a context for a template renderer and a render context.- Parameters:
template
- The template renderercontext
- The function render context
-
-
Method Details
-
addArgument
Uses the value of the argument at the given index as value to be bound to the current parameter.- Parameters:
index
- The index of the argument- Returns:
- This context for chaining
-
addParameter
Uses the given chunk as value to be bound to the current parameter.- Parameters:
chunk
- The chunk to use as value- Returns:
- This context for chaining
-
build
public void build()Binds the values to the underlyingFunctionRenderContext
.
-