I have some problem with creating my own annotations in Kotlin. I have to create some annotations and in some of them i need to declare values with array type. In java we can do this:
public @interface JoinTable {
...
JoinColumn[] inverseJoinColumns() default {};
...
}
Where JoinColumn is also an annotation type.
I want to do something like that in Kotlin:
annotation class JoinTable(
val name: String,
val joinColumns: Array<JoinColumn>
)
I also tried to do this:
annotation class JoinTable(
val name: String,
val joinColumns: List<JoinColumn>
)
But my IDe says:
Invalid type of annotation member
What should i do?
Thank you!