Some form of name mangling (for code that should not be accessible to sourcecode). In particular, the set of valid symbol characters in the jvm is larger than the set of valid symbol characters in the Java language. The only restriction would be that the affected symbols would not be accessible from Java in the same module (only for internal visibility). Obviously languages that are more permissive in their symbols could use the symbol, but then again, if you use a symbol called private$foo
then you are doing the Java equivalent of the C/C++ #define private public
.
Perhaps marking things synthetic (like Java’s bridge methods) would work as well.