# Get Function Annotations from Parent Class in Kotlin

**URL:** <https://discuss.kotlinlang.org/t/get-function-annotations-from-parent-class-in-kotlin/27248>\
**Category:** Support\
**Created:** [August 16, 2023, 7:36am UTC](https://discuss.kotlinlang.org/t/get-function-annotations-from-parent-class-in-kotlin/27248 "2023-08-16T07:36:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vish234al](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vish234al](https://discuss.kotlinlang.org/u/vish234al)\
**Post date:** [August 16, 2023, 7:36am UTC](https://discuss.kotlinlang.org/t/get-function-annotations-from-parent-class-in-kotlin/27248/1 "2023-08-16T07:36:34Z")

</div>

Say I have the following situation:

```auto
abstract class Foo {

    abstract fun bar();

    fun baz() {
        println(this::bar.annotations)
    }

}

class Qux : Foo {

    @Annotation
    override fun bar() {
        ...
    }

}

```

When I try to implement this it does _not_ get the annotations as defined in the child class, it gets them as defined in the parent class. If I remember correctly Java used to do the former, which is what I’m attempting to do here. My goal output is for it to print the `@Annotation` when `Qux#baz` is run. Is this possible in kotlin?

Using `this::bar.javaClass.annotations` does fix it so I can see the annotation, however I then cannot get the type of the annotations using `is`, at least if I can I’m not entirely sure how.
