javapoet-dsl / com.mostlycertain.javapoetdsl / com.squareup.javapoet.TypeName / ensureBoxed

ensureBoxed

fun TypeName.ensureBoxed(): TypeName

If the type is primitive (e.g. int, char), return the boxed type (e.g. Integer, Character). Otherwise, return this.

This is an alias for TypeName.box created to match ensureUnboxed.