String (@NotNull JvmClass aClass) { final List<String> parts = new SmartList<>(); JvmClass current = aClass; while (true) { final JvmClass containingClass = current.getContainingClass(); if (containingClass == null) { // current class is top-level class String qualifiedName = current.getQualifiedName(); if (qualifiedName == null) return null; parts.add(qualifiedName); break; } else { String name = current.getName(); if (name == null) return null; parts.add(name); current = containingClass; } } return join(reverse(parts), "$"); }