Java classes are called "inner classes" because they are truly inside the definition of a Java class. I don't know of a way to get around this (Java doesn't allow you to put the definition of a class...