Commit 25be9dc
Annotate StableHloConverterFactory for Java call sites (#400)
Adds `@JvmStatic` to every factory method on the
`StableHloConverterFactory` object (`createBasic`, `createExtended`,
`createFast`, `createCustom`) plus `@JvmOverloads` on `createCustom`
so every parameter default generates a separate JVM overload.
Before: Java call sites had to go through the Kotlin singleton
marker:
var converter = StableHloConverterFactory.INSTANCE.createExtended();
After: Java callers can use the idiomatic static form:
var converter = StableHloConverterFactory.createExtended();
The `@JvmStatic` annotation lives in `commonMain` — Kotlin 1.9+
accepts JVM-specific annotations in common code and treats them
as no-ops on non-JVM targets. Verified across all Kotlin
Multiplatform targets (jvmTest, wasmJsTest, wasmJsBrowserTest,
wasmWasiTest, wasmWasiNodeTest, macosArm64Test,
iosSimulatorArm64Test) — zero regressions.
Second of five commits polishing the Java / JVM consumption
story for the upcoming 0.19.0 release. See #400.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1253b42 commit 25be9dc
1 file changed
Lines changed: 6 additions & 0 deletions
File tree
- skainet-compile/skainet-compile-hlo/src/commonMain/kotlin/sk/ainet/compile/hlo
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
0 commit comments