Wednesday Jan 23, 2008

Or, watching your language with dangerous characters.

The JVM uses symbolic names to link together the many hundreds of classes that make up an application. Symbols in the JVM are represented in a uniform syntax, a counted sequence of Unicode characters. The JVM can readily accept class, package, method, field, and type names which could be any string, not just the strings accepted by the Java compiler.  Let's call such names “exotic names”.

The JVM originally inherited symbol spelling restrictions from the Java language, but in recent years it has removed most restrictions. This note describes how to remove the remaining restrictions, by presenting a universal mangling convention to encode arbitrary spelling strings. (Updated 2/09/2009.)[Read More]

This blog copyright 2009 by jrose