Skip to content

Commit 30528fc

Browse files
HLGreerswankjesse
andauthored
Add documentation comment to WireBinaryCompatibilityIrGenerationExtension
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
1 parent 8bf29b0 commit 30528fc

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

wire-binary-compatibility-kotlin-plugin/src/main/kotlin/com/squareup/wire/binarycompatibility/kotlin/WireBinaryCompatibilityIrGenerationExtension.kt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ import org.jetbrains.kotlin.name.ClassId
4848
import org.jetbrains.kotlin.name.FqName
4949
import org.jetbrains.kotlin.name.Name
5050

51+
/**
52+
* Rewrites calls to Wire-generated constructors like this:
53+
54+
* ```kotlin
55+
* val money = Money(
56+
* amount = 5,
57+
* currency = "USD",
58+
* )
59+
* ```
60+
*
61+
* into calls to the corresponding builders:
62+
*
63+
* ```kotlin
64+
* val money = Money.Builder()
65+
* .amount(5)
66+
* .currency("USD")
67+
* .build()
68+
* ```
69+
*/
5170
class WireConstructorCallRewriter(
5271
private val pluginContext: IrPluginContext,
5372
val constructorCall: IrConstructorCall,

0 commit comments

Comments
 (0)