T
Timo Nentwig
Hi!
IDE like eclipse have methods to autmatically generate Getter/Setter but
they bloat the code and make it more hard 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
Getter/Setter which can be overrided:
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);
}
}
Regards
Timo
IDE like eclipse have methods to autmatically generate Getter/Setter but
they bloat the code and make it more hard 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
Getter/Setter which can be overrided:
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);
}
}
Regards
Timo