Why GetSet is the solution

  • keep your java source and javadoc (in source and html generated) concise, compact and readable (sometimes remove 85% of noisy code)(IMHO)
  • compliant with today IDE and compiler (javac)
  • easy to install and use
  • No more need to write, read and maintain trivial code (basic getter and setter).
  • efficient and elegant (IMHO)
  • simple for simple case and more complex for complex case, follow the KISS (Keep It Simple Stupid). And a syntax that is very short for default behavior but +/- easily expendable in case of something more complex.
  • work with framework/libraries like jsf, velocity, el, jxpath, ... using reflection to acces properties (Thanks to GetAndSetAdder that help lib to accept public fields as properties)
  • allow overriding of read/write attribute, similar to overriding default getter/setter (Thanks to AOP)
  • no need to change the caller's code when you enhance the access to a property
  • centralize, separate concerns : trace policies, security policies, management of propertyChangeListener, ... (Thanks to AOP)