add Named
fun addNamed(format: String, arguments: Map<String, *>): CodeBlock.Builder
Content copied to clipboard
Adds code using named arguments.
Named arguments specify their name after the '%' followed by : and the corresponding type character. Argument names consist of characters in a-z, A-Z, 0-9, and _
and must start with a lowercase character.
For example, to refer to the type java.lang.Integer with the argument name clazz
use a format string containing %clazz:T
and include the key clazz
with value java.lang.Integer.class
in the argument map.