My question is intentionally titled nearly exactly like this one, but what I want is to strip the package name and nothing else. My classes look like
class AProperlyAndDescriptivelyNamedClass {
class First {...}
class Next {...}
class Last {...}
}
class AnotherTopLevelLongNamedClass {
class First {...}
class Next {...}
class Last {...}
}
As you can see, I'm using some long and descriptive class names for my top-level classes and repeating all the stuff in the nested classes would be pretty nonsensical. Using some strange shortcut would be no better. I always refer to the classes using their enclosing class (and no package) and that's how I want to print them too.
I know I could get the package name and strip a corresponding number of characters from the full class name, but I guess somebody did it already?