Is your feature request related to a problem? Please describe.
It is not possible to put multiple @OnKey annotations on a single method, because OnKey is not repeatable.
Describe the solution you'd like
We should add a second annotation class OnKeys and make OnKey repeatable.
public @interface OnKeys {
OnKey[] value();
}
@Repeatable(OnKeys.class)
public @interface OnKey {
// ...
}
In the reflection and generator implementations, we can then use getAnnotationsByType(OnKey.class).
Describe alternatives you've considered
Having multiple methods with different names, that call a single method. This introduces additional boilerplate.
Is your feature request related to a problem? Please describe. It is not possible to put multiple
@OnKey
annotations on a single method, becauseOnKey
is not repeatable.Describe the solution you'd like We should add a second annotation class
OnKeys
and makeOnKey
repeatable.In the reflection and generator implementations, we can then use
getAnnotationsByType
(OnKey.class)
.Describe alternatives you've considered Having multiple methods with different names, that call a single method. This introduces additional boilerplate.
Additional context See https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html