void (final PsiClass[] classesToMove) { myClassesToMove = classesToMove; mySourcePackage = new PsiPackage[classesToMove.length]; mySourceVisibility = new String[classesToMove.length]; for (int i = 0; i < classesToMove.length; i++) { PsiClass psiClass = classesToMove[i]; mySourceVisibility[i] = VisibilityUtil.getVisibilityModifier(psiClass.getModifierList()); mySourcePackage[i] = JavaDirectoryService.getInstance().getPackage(psiClass.getContainingFile().getContainingDirectory()); } }