In Java it is possible to declare interfaces inside of interfaces:
....
public @interface NotEmpty {
....
public @interface List {
NotEmpty[] value();
}
}
The example is taken from hibernate's NotEmpty validator. Please see the following discussion for what this is good for.
Unfortunately in Kotlin an annotation class
must not have a body.
How can nested interfaces be achieved in Kotlin?