Outside access to protected members

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Nov 06 2002 - 17:53:01 EST

  • Next message: Craig Miskell: "Re: Outside access to protected members"

    I am not intimately familiar with Java SecurityManager. So today I
    discovered one thing that is totally new for me - you can actually
    read/write a value of a protected field of an object located in another
    package, using reflection:

    http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/ReflectPermission.ht
    ml

    This opens new ways of implementing a DataObject. Of course using this would
    break encapsulation, but TopLink for instance uses it all over the place.

    Interesting...

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Nov 06 2002 - 17:53:05 EST