Proposal: bean type

Martin Krüger mkrueger at gmx.net
Fri Sep 18 12:11:35 PDT 2009


Hi,

hope this is the right place. My proposal is to introduce a new class 
type called bean. For example, one can define a bean with the keyword bean:

bean Car {
...
}.

Then one can define fields by the keyword property:

bean Car {
  property String type;
  property int ps;
}.

Now, I introduce some modifiers, which are set, get and notify. So one 
can define a property:

bean Car {
   property set get String type;
   property set notify int ps;
}.

set means that a setter is automatically generated. The same with get. 
Notify means, that an PropertyChangeEvent is thrown if this property is set.

The benefit of this proposal is the very short definition of value objects.

Greetings,
  Martin



More information about the coin-dev mailing list