Ah, non-academic use case... I don't mean to start a flame war, but
"Hibernate has it!" :-) There's probably a good chance a user of
Hibernate may have recommended this feature. And the purpose is to allow
properties to be set without having to expose getters.
I am strongly against allowing the developer to go fields explicitly. It
should be used totally as a fallback mechanism, and only then if
enabled. I agree with Jeff.
Paul
Jeff Butler wrote:
Is there any realistic non-academic use case for bypassing the
getters/setters if they exist? In other words, if you want to go by
plane then don't rent a car :)
We really encourage people to keep their POJOs simple. I'd sure hate to
see us encourage wierd or overly complex design just because we can.
Maybe we should bypass all the non-standard syntax and configuration
options. If you have getters/setters then we'll use them. If not, then
we'll use the fields directly. End of story.
Jeff Butler
On 2/10/07, *Paul Benedict* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
OGNL uses property notation syntax which calls getters and setters. As
for the parenthesis syntax, there is no precedent in the market for
such
a syntax being used to access fields directly. The syntax should be the
same (I want to navigate to X), with an additional attribute specifying
how it should be done (take me by plane or car).
Paul