Package com. rnett. plugin. stdlib
The com.rnett.plugin.stdlib
package provides builders for common standard library functions, using the Naming and IR Utilities features (and providing good examples of how to use them). Collections, toString
and hashCode
, typeOf
, scope functions, numbers, and common exceptions are included. All builder methods are tested. Note that unlike for Naming, extension functions are members of their extension receiver, i.e. Map.getValue
. In some cases, builders will resolve their functions based on the types of arguments, such as for number operators or nullable toString
and hashCode
. The receiver arguments are type checked (in IR) in most cases, the other arguments aren't.
Note that using a lot of these functions is a bad idea. If you find yourself generating a lot of code using these methods, you should probably create a utility function and call it from IR instead. The number of builders is there to provide breadth, not depth.
Types
A collection of References from Kotlin's standard library. Accessible in IR from com.rnett.plugin.ir.HasContext.stdlib
The standard library builders, accessible from from com.rnett.plugin.ir.HasContext.stdlib