Java Beans: What am I missing?

前端 未结 5 1950
别跟我提以往
别跟我提以往 2021-02-07 06:08

I\'m wondering if I\'m missing something about Java Beans. I like my objects to do as much initialization in the constructor as possible and have a minimum number of mutators. B

5条回答
  •  灰色年华
    2021-02-07 06:37

    Beans are configured that way so automated tools can create and modify the Beans. They aren't meant to necessarily be great design patterns.

    Examples of these tools:

    Hibernate
    JMX

提交回复
热议问题