Perhaps, there may be a slight performance hit, but the part using Reflections runs only once -- when the class is loaded for the first time. We can, of course, manually use map.put(), but the intent was for us asking the JVM to do it automatically. I do not have benchmarks for this, but would be happy to include it in the post should you do so!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
this is a great workaround, but won't tjis affect the performances? especially when you use reflection to load the data and to 'enumerate' the fields?
Perhaps, there may be a slight performance hit, but the part using Reflections runs only once -- when the class is loaded for the first time. We can, of course, manually use
map.put()
, but the intent was for us asking the JVM to do it automatically. I do not have benchmarks for this, but would be happy to include it in the post should you do so!