Java classes with dynamic fields

后端 未结 5 728
孤独总比滥情好
孤独总比滥情好 2021-02-06 10:55

I\'m looking for clever ways to build dynamic Java classes, that is classes where you can add/remove fields at runtime. Usage scenario: I have an editor where users should be ab

5条回答
  •  悲哀的现实
    2021-02-06 11:28

    You can use the bytecode manipulation libraries for it. Shortcoming of this approach is that you need to do create own classloader to load changes in classes dynamically.

提交回复
热议问题