Java toString() using reflection?

后端 未结 7 1602
梦如初夏
梦如初夏 2020-12-02 18:30

I was writing a toString() for a class in Java the other day by manually writing out each element of the class to a String and it occurred to me that using reflection it mig

相关标签:
7条回答
  • 2020-12-02 18:56

    If you're using Eclipse, you may also have a look at JUtils toString generator, which does it statically (generating the method in your source code).

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