Chinese President Xi Jinping at the World Economic Forum annual meeting in Davos, Switzerland, on Tuesday. (Ruben Sprich/Reuters)

Meet the new anti-Trump, Chinese President Xi Jinping. With an ode to globalization at the World Economic Forum at Davos, Switzerland, on Tuesday, a commitment to invest $360 billion in renewable energy, a pledge to open China further to foreign investment and a plea not to engage in a trade war, China’s strongman is trying to position himself as the adult supervisor in a world where the United States, in China’s view, is soon to be run by a petulant child.

On one hand, Xi’s paean to the global elites makes sense. More than any other nation, China has benefited from the Pax Americana — the system of free trade, secure waterways and globalized financial markets built by the United States and its allies after World War II. It is no mere coincidence that although China’s growth was impressive in the 1980s and 1990s, it became a global trading power only after 2001, when the United States ushered it into the World Trade Organization. So it’s natural that Xi would defend a system that has provided China with so much.

But let’s be real. Xi’s newfound mission as the guardian of globalization has a pragmatic, even cynical side. It shows the world that he’s not Donald Trump. Once again, as it has so many times in the past, the leadership of the Chinese Communist Party is appealing to the rest of the humanity by distinguishing itself from the United States. Indeed, despite the fact that China has benefited from globalization, it has done so more, in the words of outgoing president Barack Obama, as a “free rider” than anything else.

Take climate change. In his speech, Xi positioned himself as the defender of the Paris climate accord. But China remains the world’s largest user of coal and has plans to use more. Xi stressed China’s commitment to clean energy, but it’s important to remember that wind generation as a proportion of all power generation is about 50 percent higher in the United States than in China.

Xi also lauded innovation, free trade and world connectivity. But inside China, his government squeezes American technology companies, limits access to foreign websites and cracks down on foreign-funded nongovernmental organizations. Indeed, for all of Xi’s embrace of globalization, China remains a very closed society. As the economist Christopher Balding recently noted, there are well under a million foreigners living in China while China is now the biggest sender of immigrants to America, propelled to America’s shores by factors raging from pollution in China to economic opportunity and political freedom in the United States.

In the Swiss Alps, Xi warned that “pursuing protectionism is like locking oneself in a dark room.” But at home, China’s mercantilist industrial policy aims to make the country self-sufficient in semiconductors and a vast array of other high-tech products within the next 10 years. “No one will emerge as a winner in a trade war,” said the leader of a country with an average tariff rate almost eight times higher than that of the United States. The Davos crowd hailed Xi’s commitment to “investment liberalization.” Did they know that China formally bans investment in about 60 sectors, and informally in many more? Indeed, even after decades of economic reforms, most foreign investors are required to find a Chinese joint venture partner and to share their industrial secrets with it if they want to do business in the country.

In truth, China’s leader shares more with the American president-elect than he probably cares to admit. Both want to make their respective countries great again; Xi calls his endeavor “the China Dream.” Both have little truck with critics. It’s just that Trump, for the time being, tweets insults about his detractors while Xi locks them up. For better or worse, both distrust globalization — only Xi seeks a leg up by not admitting it.