Skip to content

Commit 9c22195

Browse files
committed
minor adjustments
1 parent 74ae770 commit 9c22195

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

java/arcs/core/data/SchemaRegistry.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ package arcs.core.data
1616
object SchemaRegistry {
1717
private val schemas: MutableMap<String, Schema> = mutableMapOf()
1818

19-
internal fun register(schema: Schema) {
19+
/** Store a [Schema] in the registry. */
20+
fun register(schema: Schema) {
2021
schemas[schema.hash] = schema
2122
}
2223

23-
/** Given a schema hash as a String, return the schema for that has, if it exists. */
24+
/** Given a schema hash as a [String], return the [Schema] for that hash, if it exists. */
2425
fun fromHash(hash: String) = schemas[hash]
2526
}

src/tools/schema2kotlin.ts

-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ ${this.opts.wasm ? `
299299
override fun toString() = "${name}(${this.fieldsForToString.join(', ')})"
300300
}
301301
302-
303302
class ${name}_Spec() : ${this.getType('EntitySpec')}<${name}> {
304303
305304
${this.opts.wasm ? '' : `\

src/tools/tests/goldens/generated-schemas.jvm.kt

-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class GoldInternal1() : Entity {
7070
override fun toString() = "GoldInternal1(val_ = $val_)"
7171
}
7272

73-
7473
class GoldInternal1_Spec() : EntitySpec<GoldInternal1> {
7574

7675
companion object {
@@ -194,7 +193,6 @@ class Gold_Data() : Entity {
194193
override fun toString() = "Gold_Data(num = $num, txt = $txt, lnk = $lnk, flg = $flg)"
195194
}
196195

197-
198196
class Gold_Data_Spec() : EntitySpec<Gold_Data> {
199197

200198
companion object {

src/tools/tests/goldens/generated-schemas.wasm.kt

-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class GoldInternal1() : WasmEntity {
6666
override fun toString() = "GoldInternal1(val_ = $val_)"
6767
}
6868

69-
7069
class GoldInternal1_Spec() : WasmEntitySpec<GoldInternal1> {
7170

7271

@@ -203,7 +202,6 @@ class Gold_Data() : WasmEntity {
203202
override fun toString() = "Gold_Data(num = $num, txt = $txt, lnk = $lnk, flg = $flg)"
204203
}
205204

206-
207205
class Gold_Data_Spec() : WasmEntitySpec<Gold_Data> {
208206

209207

0 commit comments

Comments
 (0)