Is it possible to compose or extend annotations in...
# getting-started
b
Is it possible to compose or extend annotations in kotlin? In java you could add an annotation as a property like
Copy code
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface SuperAnnotation {
    String value();
}

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface SubAnnotation {
    SuperAnnotation superAnnotation();
    String subValue();
}
h
Not sure what you wanna do, but I think it translates pretty much 1:1 – annotations can have other annotations as parameters.
b
👍
I think I got tripped up on constructor params vs default values