-
-
Notifications
You must be signed in to change notification settings - Fork 833
Open
Labels
Description
Hello,
In the plugin I'm developing, I need to use method modifiers within the advice. As a first approach, I bound @Origin Method, but this requires reflectively retrieving the Method every time, or alternatively caching it.
As I only needed the modifiers, I've created a custom binding that allows me to use the @Origin annotation on an int parameter and map the modifiers as a constant.
It boils down to adding a new if condition to the ForOrigin.Factory.make method.
This makes sense as a general-purpose functionality of the annotation. When rendering it into a String, a new flag could be used to render the modifiers as they appear in the code, following the Java order convention.
What do you think?