The Yale University community, accustomed to its comforts and privacy, has recoiled from the garish publicity surrounding the New Haven Connection of last Monday's assassination attempt on President Reagan, and closed ranks behind one of its own.

Actress Jodie Foster -- who was apparently the object of an obsession on the part of John Warnock Hinckley Jr., the man accused of shooting Reagan and three other men outside the Washington Hilton Hotel -- went to Yale to be an ordinary freshman, say people who know her. She tried to be no different from the 5,000 other students who toss Frisbees and pick flowers along the well-worn paths crossing the campus.

If she was never able to be quite ordinary, she at least achieved the kind of acceptance that allowed fellow freshman Josh Chernoff, asked about Foster today, to reply offhandedly, "I know that her French is excellent."

And her desire to stay out of the public eye and downplay whatever dark associations her image on the movie screen apparently triggered in Hinckley's mind is being respected in this self-contained society where final examinations seem much more important, at the moment, than world affairs.

"Yale is used to people who are prominent for one reason or another, and you have to respect that," one student said. "A person ought to have at least the minimal publicity that this place affords. I think Jodie must feel awful having her name linked with this for any reason. I don't think poking a bunch of TV lights into her bedroom window is going to make things any better."

Said John Wilkinson, the university's alumni affairs officer: "I think it's fair to say that the student body is relatively indifferent to all this, except in terms of trying to protect her [Foster] from the media. They try to treat her the way she wants to be treated -- like any other student."

Foster's arrival last fall at Welch Hall in Yale's Old Campus, a section reserved for freshmen, was greeted with some trepidation, say students. For weeks she seemed to draw crowds wherever she went, and for a while she even moved to a New Haven hotel to avoid the crowds.

Students say that some other residents of the dormitory complained to school officials that the large number of phone calls Foster received tied up the lines. She was listed as first with the university's phone operators by her real name, Alicia Foster, one operator said today. Eventually, her number was taken off the list entirely.

Some of Foster's neighbors also complained about the groups of young men who often congregated outside.

"It was nothing for a bunch of guys to get drunk and go banging on the door late at night screaming 'Jodie! Jodie! We want to meet you!'" said one student. "I guess you can see how that would get a little aggravating after a while."

The splash of Hollywood celebrity and glamor did not go over well in this normally tranquil haven where old money jangles in the pockets of pastel pants, a place full of Sperry Topsiders and spiral notebooks and defined by rigorous academic traditions. But students say they came to respect Foster's wish to be just another Yalie.

Many students say they abhor the plague of journalists that has descended on New Haven this week to ferret out every available detail about Hinckley's attempts to contact Foster at Yale, as well as every available detail about Foster herself.

"We've had it -- there are more media crews than professors here," said author John Hersey, who teaches several undergraduate writing seminars at Yale. "It's really gotten crazy -- the press has gone wild. The resentment has been building up."

Hersey said that seven of the 10 students in his nonfiction seminar have been hired by news organizations to help track Foster or interview her friends.

"I've seen her maybe three or four times all year, but I really don't feel inclined to tell you anything," Valerie Hopkins, a junior from Wisconsin, told a reporter today. "My feeling is she came here to learn, she came here for peace and quiet and you people are violating her privacy. I think you'll find that everyone feels very protective of her."

Officials at the university's Calhoun College, which Foster attends, say they have decided to give no comment to the press. "We are respecting Miss Foster's privacy," said a spokesman. Television crews were eventually barred from the college's courtyards and its elegant Gothic dining hall.

Foster is generally described as a sincere, unpretentious young woman who is both popular and bright. She studies English and French and has expressed an interest in creative writing.

The performance for which Foster is most famous -- and apparently the one seized upon by Hinckley as fodder for his fantasies -- was as a teen-age prostitute in the highly acclaimed film "Taxi Driver" five years ago. She is now portraying another prostitute in a campus production of the play "Getting Out." Last night's sold-out performance went off without incident, and Foster was escorted from the theater under heavy security.

Like most other students, Foster is said to be concerned at the moment about exams.