I had once come across a post that said that we can use the SecurityManager to restrict certain classes from calling a public method of another class. How do we do that?
Asked
Active
Viewed 1,995 times
1
Tom Hawtin - tackline
- 145,806
- 30
- 211
- 305
Swaranga Sarma
- 13,055
- 19
- 60
- 93
2 Answers
2
You could have at least linked to the answer, and then said more clearly, what you don't understand. So, I will link for you to my answer to a similar question from yesterday.
If something still is not clear, comment on this answer.
Community
- 1
- 1
Paŭlo Ebermann
- 73,284
- 20
- 146
- 210
0
Perhaps they are thinking of hiding packages hierarchies from classes loaded by other class loaded through the package.access security property. See Guidelines 1-1a of the Secure Coding Guidelines for the Java Programming Language, Version 3.0. Other than that, if a class cannot see a ClassLoader (by any means!) then they will not be able to interact with classes of that class loader.
Tom Hawtin - tackline
- 145,806
- 30
- 211
- 305