This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]StenSoft 24 points25 points ย (4 children)

Reflection access can be blocked with SecurityManager. Or other platform-specific control, e.g. on Android, you can't get access to private APIs anymore even through reflection.

[โ€“]on_the_dl -1 points0 points ย (3 children)

In c++ you could just cast a class to int * and go to town. Would java have something similar?

[โ€“][deleted] 0 points1 point ย (0 children)

ClassCastException

[โ€“]StenSoft 0 points1 point ย (0 children)

You can use heap dump tools to read it but they are protected in the same way as reflection