Gordon,

The notion of public, protected, and private are design constructs, not
runtime behaviors. The JVM may have permission to anything it wants, unless
security is installed. I once fell into this trap too :-) It's not pretty.
Just understand that you're read-only interfaces are to help design well,
not to prevent the magic of reflection. Think design, not physical laws of
the universe.

Paul

On 5/7/07, Niels Beekman <[EMAIL PROTECTED]> wrote:

Java Reflection allows to bypass this using
Member.setAccessible(true)...

Niels

-----Original Message-----
From: Gordon Ross [mailto:[EMAIL PROTECTED]
Sent: maandag 7 mei 2007 11:10
To: [email protected]
Subject: RE: How to support read-only fields/paramters

Yes it does help : It works  a treat - but how ?  Private methods are
only accessable from within the class itself, and iBatis is not part of
my class.

GTG

>>> "MCCORMICK, Paul" <[EMAIL PROTECTED]> 05/07/07 8:35 AM
>>>

Ibatis can use the private methods.

E.g.  If you define the method as "private void setId(Integer id) {..}"
then ibatis can call it.

Hope this helps,


Reply via email to