How to restrict developers to use reflection to access private methods and constructors in Java?

Run your application using a SecurityManager and a sufficiently restrictive security policy.

There’s a short summary in the tutorial and extensive information in the security documentation.

Leave a Comment