Method references in annotations
ruppel.julian at gmail.com
Wed Nov 7 19:17:54 UTC 2018
being aware that there has been a discussion quite some time ago (
I wanted to come up again with this topic as this feature would be
beneficial especially for framework developers who wants to appoint
behaviour to annotations.
The following snippet shows what I want to vote for.
@MyAnnotation(method = MyClass::myMethod)private String myVariable;
This would be far more type-safe compared to using string literals to find
the method via reflection.
More information about the core-libs-dev