# Kotlin Annotation Reflection

**URL:** <https://discuss.kotlinlang.org/t/kotlin-annotation-reflection/6952>\
**Category:** Support\
**Created:** [March 8, 2018, 12:56pm UTC](https://discuss.kotlinlang.org/t/kotlin-annotation-reflection/6952 "2018-03-08T12:56:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jozzan](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jozzan](https://discuss.kotlinlang.org/u/jozzan)\
**Post date:** [March 8, 2018, 12:56pm UTC](https://discuss.kotlinlang.org/t/kotlin-annotation-reflection/6952/1 "2018-03-08T12:56:16Z")

</div>

I’m trying to add all properties of an annotation instance to a list like this:

```
if (configuration != null) {
        val fields = configuration.javaClass.kotlin.memberProperties
        fields.forEach {
            if(it.visibility == KVisibility.PUBLIC) {
                properties.add(Pair<Any, Any?>(it.name, it.get(configuration)))
            }
        }
    }

```

yet i cannot retrieve the actual value of the annotation property. There is no accessor and no backing field present. I also search through java fields, but can’t seem to find a straight forward way to simply retrieve all property values.

How would one go about that?
