private void appendMirrorText(StringBuilder buffer) {
    buffer.append(BANNER);

    PsiJavaModule module = getModuleDeclaration();
    if (module != null) {
      ClsElementImpl.appendText(module, 0, buffer);
    }
    else {
      PsiClass[] classes = getClasses();
      if (classes.length > 0) {
        PsiClass topClass = classes[0];
        if (PsiPackage.PACKAGE_INFO_CLASS.equals(topClass.getName())) {
          PsiAnnotation[] annotations = topClass.getAnnotations();
          for (PsiAnnotation annotation : annotations) {
            ClsElementImpl.appendText(annotation, 0, buffer, ClsElementImpl.NEXT_LINE);
          }
          ClsElementImpl.appendText(getPackageStatement(), 0, buffer, "\n");
        }
        else {
          ClsElementImpl.appendText(getPackageStatement(), 0, buffer, "\n\n");
          ClsElementImpl.appendText(topClass, 0, buffer);
        }
      }
    }
  }
private void appendMirrorText(StringBuilder buffer)