Jeremy Haile wrote:
> 
> I know this is a rehash, but I couldn't find any current posts in the
> mail archive on this.
> 
> I assume Castor will eventually support overriding Java's method access
> levels via Reflection.  This is such an easy thing to do, I'm not really
> sure why Castor does not support it already.
> 
> For instance, if I have an immutable property, I do not want to allow my
> entire application to set it via a public modifier just so that Castor
> can unmarshal my object correctly.  Therefore, I should be able to leave
> the access level protected.  Castor can simply use reflection to bypass
> the method access level and call the method anyway.  I can think of many
> instances where this case would occur and think it should definitely be
> at least an option.  What has the past thought been on this feature?  Any
> chance it could be added soon?

I think the main reason was that for the first couple years we were
trying to maintain JDK 1.1 compatibility. That's obviously no longer an
issue.

There is also the issue of...if something is marked private...it's
probably not intended for general access. :-)

I'm not really convinced this is something urgently needed, but I'm also
not against someone providing the ability for those who really want/need
it either. Personally, IMO, if a method is private, it's private for a
reason, so I'm not a big fan of accessing private data, even if the
system method access levels allow it.

Just my $0.02.

If you (anyone reading this) really feel the need for this type of
support and are willing to code it and contribute, I won't reject the
concept.

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to