code: private void updateGlobalNameDeclarationAtClassNode(Name n, boolean canCollapseChildNames) {
      if (!canCollapseChildNames || !canCollapse(n)) {
        return;
      }
  
      Ref ref = n.getDeclaration();
      String className = ref.getNode().getString();
      addStubsForUndeclaredProperties(
          n, className, ref.getNode().getAncestor(2), ref.getNode().getParent());
    }
docs: Updates the first initialization (a.k.a "declaration") of a global name that occurs at a CLASS
  node. See comment for {@link #updateGlobalNameDeclaration}.
  
  @param n An object representing a global name (e.g. "a")