注释的实现
@Target(AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.RUNTIME)
annotation class Returnable
虚拟数据类
data class DataClass(
val property: String
@Returnable
val annotatedProperty: String
)
Java 反射过滤不起作用
this::class.memberProperties
.filter{ it.annotations.map { ann -> ann.annotationClass }.contains(Returnable::class)}