Class Template.BoundBuilder
java.lang.Object
io.aiven.commons.kafka.connector.common.templating.Template.BoundBuilder
- Enclosing class:
Template
A builder for Template.Bound instances.
-
Method Summary
Modifier and TypeMethodDescriptionadd(Template.Bound bound) Adds all the bindings from the Template.Bound to this builder.add(Template.BoundBuilder builder) Adds all the bindings from the builder to this builder.Bind the variable to a function to convert a parameter to a string.Bind the variable to the supplier of string.build()Builds the bound template.
-
Method Details
-
add
Adds all the bindings from the builder to this builder. Will overwrite any bindings with the same name.- Parameters:
builder- the builder to copy bindings from.- Returns:
- this.
-
add
Adds all the bindings from the Template.Bound to this builder.- Parameters:
bound- the Template.Bound to copy from.- Returns:
- this
-
bind
Bind the variable to the supplier of string.- Parameters:
name- the name to bind.binding- the binding.- Returns:
- this
- Throws:
IllegalArgumentException- if the variable is not in the template.
-
bind
Bind the variable to a function to convert a parameter to a string.- Parameters:
name- the name to bind.binding- the function to bind.- Returns:
- this
- Throws:
IllegalArgumentException- if the variable is not in the template.
-
build
Builds the bound template. Will log any missing bindings.- Returns:
- the bound template.
-