commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@btopenworld.com
Subject Re: [lang] Proposal for *NEXT* version
Date Fri, 04 Oct 2002 17:06:44 GMT
>  from:    John Yu <john@scioworks.com>
> I also wish to have your hypothetical syntax available in Java.
> In Java 3.0, perhaps. :-)
;-)
As far as I got in practical terms was interface based beans:
public interface Person extends Bean {
  public StringProperty surname();
  public IntegerProperty age();
// optional
  public String getSurname(); 
  public void setSurname(String);
  public Integer getAge();
  public void setAge(Integer);
}

To use the interface requires a factory however:
Person person = JodaFactory.create(Person.class);

There are advantages and disadvantages to this approach. The main downside is that you have
to use factories and can't easily have specialised get/set methods.

Deep IDE hacking could solve the factory issue (by generating the implementing class as you
save the interface), but I don't have that amount of time.

Stephen
 


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message