Package com.google.mu.util
Interface StringFormat.Template<T>
- Enclosing class:
StringFormat
public static interface StringFormat.Template<T>
A template that will produce instances of type
T
, after filling the
template placeholders with the given variadic parameters.- Since:
- 8.0
-
Method Summary
-
Method Details
-
with
Returns an instance ofT
from the string format filled withparams
.The correctness of the number of parameters and them being in the expected order (as defined by the template's placeholders) is checked by a compile-time plugin so for example
template("WHERE id = {user_id} AND name = {name}").with(name, userId)
will fail to compile. -
toString
String toString()Returns the string representation of the format.
-