This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes OOP - jar protected method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "OOP - jar protected method?" Watch "OOP - jar protected method?" New topic

OOP - jar protected method?

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
Hi all
I have a base class � WebContainer from which I derive two classes, Request class and Response class.
WebContainer is a like aMap and donate both get() and set() methods for both derived classes .
The entire project is packaged into a jar and distributed to other development teams.
The team's has no need of calling request.set(objId) or response.get(objId), they only use request.get(objId) and
All set() method usages are restricted to classes in the jar file (sevarel of packages) .
What I can do is declare the request.set , and response.get methods as deprecated, so the teams will no not to use them ,
Is there any other way I can prevent them from accessing these methods?
Thank you
Sharon whipple

subject: OOP - jar protected method?