void (GrTypeDefinition typeDef, Set<GrTypeDefinition> dynamicClasses) { PsiElement containingClass = typeDef.getContainingClass(); boolean isOuterStatic = containingClass != null && CompileStaticUtil.isCompileStatic(containingClass); boolean isStatic = !dynamicClasses.contains(typeDef); if (isOuterStatic && !isStatic) { addAnnotation(typeDef, false); } if (!isOuterStatic && isStatic) { addAnnotation(typeDef, true); } }