PUBLIC OBJECT

Bean-independent Properties

I just posted the first draft of a proposal for Bean-independent Properties for the Java language.

This started when I was CC'd on email from Mikael Grev who prefers bean-attached properties. I prefer the opposite, so I figured I'd make my preference concrete. This is quite similar to an implementation by Remi Forax, who seems like a pretty damn smart guy from what I've seen so far.

What does it look like to use?

  Customer customer = ...
  String city = customer#city;
  customer&#35;city = "San Francisco";`</pre>

And to declare?<pre>`  public property Property&lt;Customer,String&gt; city
      = new BasicPropertyBuilder(property(""))
          .nonNull()
          .observable(&#35;&#35;propertyChangeSupport)
          .build();

Read the Full Proposal.