Name: jl125535 Date: 01/15/2004
A DESCRIPTION OF THE REQUEST :
A new keyword to the Java language that marks variables to have Getter/Setter to be automatically generated by the compiler.
JUSTIFICATION :
IDEs like eclipse have capability to autmatically generate getters and setters. But they bloat the code and make it harder to read. I wonder why this isn't
something the compiler could do at compile-time. Why not simply invent a
new keyword, e.g. "bean". Every bean is known to the compiler to have a
public Getter/Setter which can be overridden:
public Test
{
// will generate:
// String getBlah();
// void setBlah(String s) { this.blah = s; }
public bean String blah;
// and can be overridden:
public void setBlah(String s)
{
whatever();
super.setBlah(s);
}
}
(Incident Review ID: 232174)
======================================================================