/*
 * Copyright 2019, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package io.spine.tools.validate.code;

import static java.lang.String.format;

/**
 * An expression which does not yield a value.
 *
 * <p>The actual generated code might formally be non-void. In this case, by using
 * {@code VoidExpression} we state that the value of the expression is irrelevant. Example of such
 * an expression is {@code collection.add(element)}, which returns a {@code boolean} value, but it
 * is not used.
 */
public final class VoidExpression extends CodeExpression<Void> {

    private static final long serialVersionUID = 0L;

    private VoidExpression(String value) {
        super(value);
    }

    public static VoidExpression formatted(String template, Object... args) {
        return new VoidExpression(format(template, args));
    }
}

@@ -1045,16 +1045,127 @@
 .code;%0A%0A
+import com.google.errorprone.annotations.FormatMethod;%0Aimport com.google.errorprone.annotations.FormatString;%0A%0A
 import s
@@ -1743,16 +1743,178 @@
 %0A    %7D%0A%0A
+    /**%0A     * Creates a %7B@code VoidExpression%7D by formatting the given template string by the rules of%0A     * %7B@code String.format()%7D.%0A     */%0A    @FormatMethod%0A
     publ
@@ -1948,16 +1948,30 @@
 rmatted(
+@FormatString 
 String t

Add doc