String (PsiClass aClass, String oldInnerClassName, String newName) { String className = aClass.getName(); if (className == null || !oldInnerClassName.endsWith(className)) return newName; StringBuilder buffer = new StringBuilder(oldInnerClassName); buffer.replace(buffer.length() - className.length(), buffer.length(), newName); return buffer.toString(); }