in core/src/main/java/com/epam/coroutinecache/utils/Types.kt [17:28]
fun obtainTypeFromAnnotation(annotation: EntryClass): Type {
return if (annotation.typeParams.isEmpty()) {
if (annotation.rawType.javaObjectType.isArray) {
arrayOf(annotation.rawType.javaObjectType)
} else {
annotation.rawType.javaObjectType
}
} else {
@Suppress("SpreadOperator")
newParameterizedType(annotation.rawType.javaObjectType, *annotation.typeParams.map { obtainTypeFromAnnotation(it) }.toTypedArray())
}
}