sangjaekim
06/13/2023, 2:51 AM@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
annotation class ReflectionTarget(
val clazz: KClass<out Any> = Any::class,
)
data class UserInfo(
val name: String,
@ReflectionTarget(clazz = UserDetailsResponse::class)
val userDetails: UserDetails,
)
data class UserDetails(
val age: Int,
val email: String,
)
How can I get the information of annotation and the field of annotation by reflection using the code below on runtime?