Hello! Someone knows how to retrieve an array of ...
# kapt
f
Hello! Someone knows how to retrieve an array of data from the values passed to an Annotationclass?
Copy code
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
annotation class ReducerComponent(
        val stores: Array<KClass<out Store<*>>> = []
)
Right now I can retrieve :
element.annotationMirrors[1].elementValues
but elementValues is a map of
Key - AnnotationValue
and from annotationValue I can't retrieve nothing or cast it. In other hand using KotlinPoet and AnnotationSpec, it's the same because I get an array of
CodeBlock
but there is no way to separate the instances of my both
stores
:
// stores = [ org.sample.todo.MightStore::class, org.sample.todo.WarcraftStore::class