inspectit-ocelot icon indicating copy to clipboard operation
inspectit-ocelot copied to clipboard

Add a specialized reflection cache

Open JonasKunz opened this issue 6 years ago • 0 comments

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")
...

JonasKunz avatar Jun 25 '19 09:06 JonasKunz