inspectit-ocelot
inspectit-ocelot copied to clipboard
Add a specialized reflection cache
We have a general purpose cache now, which is performance wise sufficient for caching java.lang.refelct.Field and Method instances. However, there still needs a lot of code to be written in actions in order to perform the lookup.
The idea is top provide a specialized reflection cache similar to _cache, which gives direct reflection access and performs caching behind the scenes.
For example, the API could be used like the following:
_reflection.getFieldValue(SomeClass.class, instance, "privateField")
_reflection.invokeMethod(SomeClass.class, instance, "methodName", "firstArgument")
...