Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit a8edfdc

Browse files
committed
デシリアライザーのインターフェースを追加
1 parent bd319aa commit a8edfdc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.mapk.deserialization
2+
3+
import kotlin.reflect.KClass
4+
5+
@Target(AnnotationTarget.ANNOTATION_CLASS)
6+
@Retention(AnnotationRetention.RUNTIME)
7+
@MustBeDocumented
8+
annotation class KColumnDeserializeBy(val deserializer: KClass<out KColumnDeserializer<*, *, *>>)
9+
10+
abstract class KColumnDeserializer<A : Annotation, S : Any, D : Any>(protected val annotation: A) {
11+
abstract val srcClass: Class<S>
12+
abstract fun deserialize(source: S?): D?
13+
}

0 commit comments

Comments
 (0)