Skip to content

Commit

Permalink
Replace project usages of ArrayContentBased with ReadArrayContent
Browse files Browse the repository at this point in the history
  • Loading branch information
drewhamilton committed Dec 13, 2024
1 parent d8c58b5 commit add9db6
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class AnyArrayHolder(
@ArrayContentBased val any: Any,
@ArrayContentBased val nullableAny: Any?,
@Poko.ReadArrayContent val any: Any,
@Poko.ReadArrayContent val nullableAny: Any?,
val trailingProperty: String,
)
41 changes: 20 additions & 21 deletions poko-tests-without-k2/src/commonMain/kotlin/poko/ArrayHolder.kt
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class ArrayHolder(
@ArrayContentBased val stringArray: Array<String>,
@ArrayContentBased val nullableStringArray: Array<String>?,
@ArrayContentBased val booleanArray: BooleanArray,
@ArrayContentBased val nullableBooleanArray: BooleanArray?,
@ArrayContentBased val byteArray: ByteArray,
@ArrayContentBased val nullableByteArray: ByteArray?,
@ArrayContentBased val charArray: CharArray,
@ArrayContentBased val nullableCharArray: CharArray?,
@ArrayContentBased val shortArray: ShortArray,
@ArrayContentBased val nullableShortArray: ShortArray?,
@ArrayContentBased val intArray: IntArray,
@ArrayContentBased val nullableIntArray: IntArray?,
@ArrayContentBased val longArray: LongArray,
@ArrayContentBased val nullableLongArray: LongArray?,
@ArrayContentBased val floatArray: FloatArray,
@ArrayContentBased val nullableFloatArray: FloatArray?,
@ArrayContentBased val doubleArray: DoubleArray,
@ArrayContentBased val nullableDoubleArray: DoubleArray?,
@ArrayContentBased val nestedStringArray: Array<Array<String>>,
@ArrayContentBased val nestedIntArray: Array<IntArray>,
@Poko.ReadArrayContent val stringArray: Array<String>,
@Poko.ReadArrayContent val nullableStringArray: Array<String>?,
@Poko.ReadArrayContent val booleanArray: BooleanArray,
@Poko.ReadArrayContent val nullableBooleanArray: BooleanArray?,
@Poko.ReadArrayContent val byteArray: ByteArray,
@Poko.ReadArrayContent val nullableByteArray: ByteArray?,
@Poko.ReadArrayContent val charArray: CharArray,
@Poko.ReadArrayContent val nullableCharArray: CharArray?,
@Poko.ReadArrayContent val shortArray: ShortArray,
@Poko.ReadArrayContent val nullableShortArray: ShortArray?,
@Poko.ReadArrayContent val intArray: IntArray,
@Poko.ReadArrayContent val nullableIntArray: IntArray?,
@Poko.ReadArrayContent val longArray: LongArray,
@Poko.ReadArrayContent val nullableLongArray: LongArray?,
@Poko.ReadArrayContent val floatArray: FloatArray,
@Poko.ReadArrayContent val nullableFloatArray: FloatArray?,
@Poko.ReadArrayContent val doubleArray: DoubleArray,
@Poko.ReadArrayContent val nullableDoubleArray: DoubleArray?,
@Poko.ReadArrayContent val nestedStringArray: Array<Array<String>>,
@Poko.ReadArrayContent val nestedIntArray: Array<IntArray>,
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class ComplexGenericArrayHolder<A : Any, G : A>(
@ArrayContentBased val generic: G,
@Poko.ReadArrayContent val generic: G,
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class GenericArrayHolder<G>(
@ArrayContentBased val generic: G,
@Poko.ReadArrayContent val generic: G,
)
5 changes: 2 additions & 3 deletions poko-tests/src/commonMain/kotlin/poko/AnyArrayHolder.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class AnyArrayHolder(
@ArrayContentBased val any: Any,
@ArrayContentBased val nullableAny: Any?,
@Poko.ReadArrayContent val any: Any,
@Poko.ReadArrayContent val nullableAny: Any?,
val trailingProperty: String,
)
41 changes: 20 additions & 21 deletions poko-tests/src/commonMain/kotlin/poko/ArrayHolder.kt
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class ArrayHolder(
@ArrayContentBased val stringArray: Array<String>,
@ArrayContentBased val nullableStringArray: Array<String>?,
@ArrayContentBased val booleanArray: BooleanArray,
@ArrayContentBased val nullableBooleanArray: BooleanArray?,
@ArrayContentBased val byteArray: ByteArray,
@ArrayContentBased val nullableByteArray: ByteArray?,
@ArrayContentBased val charArray: CharArray,
@ArrayContentBased val nullableCharArray: CharArray?,
@ArrayContentBased val shortArray: ShortArray,
@ArrayContentBased val nullableShortArray: ShortArray?,
@ArrayContentBased val intArray: IntArray,
@ArrayContentBased val nullableIntArray: IntArray?,
@ArrayContentBased val longArray: LongArray,
@ArrayContentBased val nullableLongArray: LongArray?,
@ArrayContentBased val floatArray: FloatArray,
@ArrayContentBased val nullableFloatArray: FloatArray?,
@ArrayContentBased val doubleArray: DoubleArray,
@ArrayContentBased val nullableDoubleArray: DoubleArray?,
@ArrayContentBased val nestedStringArray: Array<Array<String>>,
@ArrayContentBased val nestedIntArray: Array<IntArray>,
@Poko.ReadArrayContent val stringArray: Array<String>,
@Poko.ReadArrayContent val nullableStringArray: Array<String>?,
@Poko.ReadArrayContent val booleanArray: BooleanArray,
@Poko.ReadArrayContent val nullableBooleanArray: BooleanArray?,
@Poko.ReadArrayContent val byteArray: ByteArray,
@Poko.ReadArrayContent val nullableByteArray: ByteArray?,
@Poko.ReadArrayContent val charArray: CharArray,
@Poko.ReadArrayContent val nullableCharArray: CharArray?,
@Poko.ReadArrayContent val shortArray: ShortArray,
@Poko.ReadArrayContent val nullableShortArray: ShortArray?,
@Poko.ReadArrayContent val intArray: IntArray,
@Poko.ReadArrayContent val nullableIntArray: IntArray?,
@Poko.ReadArrayContent val longArray: LongArray,
@Poko.ReadArrayContent val nullableLongArray: LongArray?,
@Poko.ReadArrayContent val floatArray: FloatArray,
@Poko.ReadArrayContent val nullableFloatArray: FloatArray?,
@Poko.ReadArrayContent val doubleArray: DoubleArray,
@Poko.ReadArrayContent val nullableDoubleArray: DoubleArray?,
@Poko.ReadArrayContent val nestedStringArray: Array<Array<String>>,
@Poko.ReadArrayContent val nestedIntArray: Array<IntArray>,
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class ComplexGenericArrayHolder<A : Any, G : A>(
@ArrayContentBased val generic: G,
@Poko.ReadArrayContent val generic: G,
)
3 changes: 1 addition & 2 deletions poko-tests/src/commonMain/kotlin/poko/GenericArrayHolder.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package poko

import dev.drewhamilton.poko.ArrayContentBased
import dev.drewhamilton.poko.Poko

@Suppress("Unused")
@Poko class GenericArrayHolder<G>(
@ArrayContentBased val generic: G,
@Poko.ReadArrayContent val generic: G,
)

0 comments on commit add9db6

Please sign in to comment.