There will be about 1 billion new members of the global "consumer class" living in urban areas by 2025, according to the McKinsey Global Institute. As waves of these people move into the middle class, many will desire what most in the developed world consider necessities as well as small luxuries they couldn't previously afford.

Investors may want to consider exploring three companies that are aggressively expanding their presence in China and that should continue to benefit from this long-term trend: Hershey (HSY 0.57%)Starbucks (SBUX 1.00%), and water-heater manufacturer A.O. Smith (AOS -1.05%).

For some context, here's how these stocks performed over the past year:

HSY Total Return Price Chart

Data by YCharts.

These companies have been longer-term outperformers as well. Starbucks' and A.O. Smith's five-year total returns of 1,000% and 574%, respectively, have trounced the S&P 500 index's 150% gain. Hershey's 212% return has solidly topped the market's, and with significantly less volatility. While past performance is no guarantee of future performance, it does often reflect how well management can plan a strategy and execute.

Planting the biggest kiss ever on Asia
The maker of the iconic Hershey bar and Reese's Peanut Butter Cup is the largest producer of chocolate in North America and sells its chocolates and other confectionery products throughout the world. 

Hershey's 2012 sales were $6.6 billion, with international sales accounting for about 15%. By 2017, the company expects revenue of about $10 billion, with about 20% of that coming from international sales. That's roughly 100% growth in five years in the international market, with the bulk of that growth expected to come from the emerging markets. 

While the candy giant has an 18-year history in the Asian region, it's only been since 2007 that it's greatly ramped up its investments in the area, which include a joint venture plant in China. Last month, Hershey announced that it was building a $250 million plant in Malaysia, which will be its single-largest investment in Asia ever. It's beefing up capacity to meet growing demand for its products among Asian consumers, particularly the Chinese.

The global confectionery market is worth $196 billion, with chocolate accounting for 55% of that, according to Euromonitor. Chocolate sales are forecast to grow 12% in five years, while sugar products ("candy") and gum are projected to grow 8.5% and 10%, respectively. Retail growth for confectionery products in emerging markets is expected to be three times faster than that of developed regions from 2012 to 2017, with 77% of global growth coming from developing markets.

Investors interested in a way to play the emerging "sweet tooths" in the emerging markets should look no further than Hershey. It's the only confectionery producer pure play that trades on a major U.S. stock exchange. Mondelez, owner of Cadbury and the world's largest chocolate company, is a diversified snack-food company. Swiss food giant Nestle, which trades over-the-counter, is also quite diversified. 

Hershey recently turned in a sweet third quarter, posting adjusted earnings of $1.04 per share, up 19.5% from the prior-year's period and beating estimates of $1.01. Revenue rose 6.1% to $1.8 billion, essentially in line with analysts' expectations.

Decreasing commodity costs have helped boost Hershey's bottom line recently. However, the long-term engines powering the company's expanding profit margin have been its product mix, as it's been introducing more profitable goodies, and pricing power, largely owed to its strong brands. Earnings have been growing considerably faster than revenue, which has led to Hershey's trailing-12-month profit margin increasing from less than 6% to 11.3% over the five-year period. 

HSY Revenue (TTM) Chart

Data by YCharts.

Starbucks already has caffeinated profits in Asia 
The cafe giant's whimsical mermaid will be gracing 750 more Asian locations in fiscal 2014, accounting for half of the company's total planned 1,500 new openings.  

It's no wonder Starbucks' expansion in its China/Asia-Pacific segment is on turbocharge. Amazingly, this unit continues to generate profit margins well in excess of the company's overall profit margin. Generally, profit margins in developing markets are a drag on a company's profitability for quite a while. 

In Starbucks' recently reported fiscal fourth quarter, for the period ending Sept. 29, the operating margin for the Asian region was 37.5% -- a solid increase from 33.1% in fiscal Q4 2012 -- and superior to the Americas (21.8%) and Europe, Middle East, and Africa (9.3%) regions' margins.

Sales in the region increased 29% over the prior year's quarter to $255.7 million, accounting for 6.7% of the quarter's $3.8 billion in revenue. Growth was due to a solid 8% increase in comparable-store sales plus revenue from new store openings over the year.

I've written this before and will state it again: Starbucks' region with the highest margin is also growing at the fastest rate. That's a winning combo. 

A.O. Smith: Bringing hot running water to many Chinese for the first time
A.O. Smith primarily makes residential and commercial water heaters and boilers. The company is the leading water-heater manufacturer in the U.S., and has a 25% market share in China.

This innovative company, which invented the now industry-standard glass-lined hot water heater, had the foresight to enter the Chinese market in 1995. Many years of investing in its China business have paid off, as A.O. Smith enjoys a strong brand name and a rising market share in the country. More important, its profit margin in its rest-of-world segment -- largely comprised of China, though it includes some European and India sales -- recently hit parity with its profit margin in its North American unit. 

Both market-share gains and an expanding overall market are driving A.O. Smith's soaring sales in China. In it most recent quarter, China sales rose 35%, and accounted for 27% of total revenue, while overall sales were up 16%. The company's geared up for growth, as it recently opened its second water-heater plant in China, which will boost its capacity by 50% once it's running at full speed.

The Foolish takeaway
As large masses of Chinese move into the middle class, many will desire to eat and drink taste-bud-pleasing foods and beverages they couldn't previously afford. Hershey and Starbucks should increasingly benefit from this long-term trend. And certainly most will be thrilled to have hot running water in their homes for the first time, which should continue to pour profits into A.O. Smith's coffers.

Starbucks and A.O. Smith likely have better growth potential than Hershey. However, Hershey's steady growth, coupled with its 2% dividend and low stock-price volatility, might appeal to more conservative investors.