By JOSH LEDERMAN Associated Press

WASHINGTON – President Barack Obama cast Donald Trump’s positions on immigration, trade and Muslims as part of an ignorance-and-isolation philosophy that the president says will lead the U.S. down the path of decline.

Obama used his commencement speech Sunday at Rutgers University to tear into the presumptive Republican nominee, without ever mentioning his name. Time and again the president invoked specific Trump policies to denounce a rejection of facts, science and intellectualism that he said was pervading politics.

“In politics and in life, ignorance is not a virtue,” Obama told some 12,000 graduates at the public university in New Jersey. “It’s not cool to not know what you’re talking about. That’s not keeping it real or telling it like it is. That’s not challenging political correctness. That’s just not knowing what you’re talking about,” the president said. “And yet, we’ve become confused about this,” he added. Obama’s rebuke came as Trump closes in on clinching the GOP nomination, raising the prospect that November’s election could portend a reversal of Obama’s policies and approach to governing. In recent days, Trump has started focusing on the general election while working to unite a fractured Republican Party around his candidacy. Democrats are readying for a fight against a reality TV host they never anticipated would make it this far.

Obama has mostly steered clear of the race as Democrats Hillary Clinton and Bernie Sanders compete into the summer for the nomination. But in speeches like this one, he has laid out themes that Democrats are certain to use as they work to deny Trump the White House. He’s urged journalists to scrutinize Trump’s vague policy prescriptions and not to emphasize what he calls “the spectacle and the circus.”

Trump has barreled his way toward the nomination by emphasizing the profound concerns of Americans who have felt left behind by the modern, global economy, summed up in his ubiquitous campaign slogan of “Make America great again.” He’s called for keeping Muslim immigrants out of the U.S., gutting Obama’s trade deals with Asia and Europe, and cracking down on immigrants in the U.S. illegally.

In his speech, Obama told graduates that when they hear people wax nostalgic about the “good old days” in America, they should “take it with a grain of salt.” “Guess what? It ain’t so,” the president said, rattling off a list of measures by which life is better in the U.S. than in decades past.