private void calculateInitializersConflicts(MultiMap<PsiElement, String> conflicts) { final PsiClassInitializer[] initializers = sourceClass.getInitializers(); for (PsiClassInitializer initializer : initializers) { if (initializerDependsOnMoved(initializer)) { conflicts.putValue(initializer, "Class initializer requires moved members"); } } for (PsiMethod constructor : sourceClass.getConstructors()) { if (initializerDependsOnMoved(constructor.getBody())) { conflicts.putValue(constructor, "Constructor requires moved members"); } } }
private void registerNestedClosures(DfaInstructionState instructionState, PsiClass nestedClass) { DfaMemoryStateImpl closureState = createClosureState(instructionState.getMemoryState()); for (PsiMethod method : nestedClass.getMethods()) { PsiCodeBlock body = method.getBody(); if (body != null) { myNestedClosures.putValue(body, closureState); } } for (PsiClassInitializer initializer : nestedClass.getInitializers()) { myNestedClosures.putValue(initializer.getBody(), closureState); } for (PsiField field : nestedClass.getFields()) { myNestedClosures.putValue(field, closureState); } }