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

后端 未结 3 864
情歌与酒
情歌与酒 2020-11-28 10:45

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

Using normal Java code we can\'t access private constructors or priv

3条回答
  •  执笔经年
    2020-11-28 11:08

    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.

提交回复
热议问题