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);
   }
 }
Esempio n. 2
0
 @NotNull
 private Initializer initializerToInitializer(@NotNull PsiClassInitializer i) {
   return new Initializer(
       blockToBlock(i.getBody(), true), modifiersListToModifiersSet(i.getModifierList()));
 }