Java: Is there support for macros?

后端 未结 7 1193
暗喜
暗喜 2021-02-12 17:47

I am just curious on how people solve this. I often write the same type of code all the time. For instance:

new Thread() {
   //...
   //...
   //...
   //Change         


        
相关标签:
7条回答
  • 2021-02-12 18:46

    It's possible to use Java annotations to generate boilerplate code. Writing your own annotation processor is not hard.

    0 讨论(0)
提交回复
热议问题