Forgot to commit serializer methods for AuthenticationSettings
This commit is contained in:
parent
a72e7d744c
commit
5c4a4a485f
|
@ -6,10 +6,18 @@ import kotlin.reflect.KClass
|
|||
|
||||
interface ISerializer {
|
||||
|
||||
fun serializeObjectToString(obj: Any): String?
|
||||
|
||||
fun serializeObject(obj: Any, outputFile: File)
|
||||
|
||||
|
||||
fun <T : Any> deserializeObject(serializedObject: String, objectClass: KClass<T>, vararg genericParameterTypes: KClass<*>): T?
|
||||
|
||||
fun <T : Any> deserializeObject(serializedObjectFile: File, objectClass: KClass<T>, vararg genericParameterTypes: KClass<*>): T?
|
||||
|
||||
fun <T : Any> deserializeListOr(serializedObject: String, genericListParameterType: KClass<T>,
|
||||
defaultValue: List<T> = listOf()) : List<T>
|
||||
|
||||
fun <T : Any> deserializeListOr(serializedObjectFile: File, genericListParameterType: KClass<T>,
|
||||
defaultValue: List<T> = listOf()) : List<T>
|
||||
|
||||
|
|
|
@ -6,14 +6,27 @@ import kotlin.reflect.KClass
|
|||
|
||||
open class NoOpSerializer : ISerializer {
|
||||
|
||||
override fun serializeObjectToString(obj: Any): String? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun serializeObject(obj: Any, outputFile: File) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun <T : Any> deserializeObject(serializedObject: String, objectClass: KClass<T>, vararg genericParameterTypes: KClass<*>): T? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun <T : Any> deserializeObject(serializedObjectFile: File, objectClass: KClass<T>, vararg genericParameterTypes: KClass<*>): T? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun <T : Any> deserializeListOr(serializedObject: String, genericListParameterType: KClass<T>, defaultValue: List<T>): List<T> {
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
override fun <T : Any> deserializeListOr(serializedObjectFile: File, genericListParameterType: KClass<T>, defaultValue: List<T>): List<T> {
|
||||
return defaultValue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue