Quantcast
Channel: A Java geek » Java
Viewing all articles
Browse latest Browse all 64

getCaller() hack

$
0
0
Disclaimer: the following is a devious hack, it should only be used if you know what you’re doing. As developers, we should only call public APIs. However, the Java language cannot differentiate between public API and private stuff: as soon as a class and one of its method is public, we can reference the former [...]

Viewing all articles
Browse latest Browse all 64