In the Java programming language, an object or class definition that follows some (but not
necessarily all) of the recommendations of the JavaBeans specification in
order to be more widely applicable.
Typically, the term "bean" can now be applied to almost any object with
private data members with corresponding public accessor
and mutator
methods. Provided the method nomenclature follows the JavaBean specification,
e.g. that a field named "xyz" of type "Foo" has an getter method getXyz(),
returning a Foo, and a setter method setXyz(Foo), the bean can
integrate with a wide variety of tools and application frameworks.
Unfortunately, what began as a somewhat cute pun in the JavaBeans trademark has
become quite a thorn in the side of software engineers, with
seemingly more and more bean puns appearing on a daily basis. I'm sure most Java
developers dread to be asked what they'd like for dinner. The response is invariably
"Anything but beans".