/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jdbi.v3.core.statement;

/**
 * Renders an SQL statement from a template.
 *
 * @see DefinedAttributeTemplateEngine
 *
 * Note for implementors: define a public default constructor, or one that takes a {@link java.lang.Class} and/or {@link java.lang.reflect.Method}, for SqlObject's {@code UseTemplateEngine} annotation, and/or create your own custom annotation in case your {@link TemplateEngine} has configuration parameters!
 */
@FunctionalInterface
public interface TemplateEngine {
    /**
     * Convenience constant that returns the input template.
     */
    TemplateEngine NOP = (template, ctx) -> template;

    /**
     * Renders an SQL statement from the given template, using the statement
     * context as needed.
     *
     * @param template The SQL to rewrite
     * @param ctx      The statement context for the statement being executed
     * @return something which can provide the actual SQL to prepare a statement from
     * and which can bind the correct arguments to that prepared statement
     */
    String render(String template, StatementContext ctx);
}

@@ -647,355 +647,452 @@
 %0A * 
-@see DefinedAttributeTemplateEngine%0A *%0A * Note for implementors: define a public default constructor, or one that takes a %7B@link java.lang.Class%7D and/or %7B@link java.lang.reflect.Method%7D, for SqlObject's %7B@code UseTemplateEngine%7D annotation, and/or create your own custom annotation in case your %7B@link TemplateEngine%7D has configuration parameters!
+Note for implementors: define a suitable public constructor for SqlObject's %7B@code UseTemplateEngine%7D annotation, and/or create your own custom annotation in case your %7B@link TemplateEngine%7D has configuration parameters! Suitable constructors are the no-arg constructor, one that takes a %7B@link java.lang.Class%7D, and one that takes both a %7B@link java.lang.Class%7D and a %7B@link java.lang.reflect.Method%7D.%0A *%0A * @see DefinedAttributeTemplateEngine
 %0A */

fix javadoc