Those familiar with the movie I Am Legend -- the story of how Will Smith single-handedly retook the planet after it was dominated by hairless goblins -- will remember that after civilization, as it was known, ended, Smith focused on three things: medicine, safety, and readily available staples.

Perfect. Now we know the types of industries that will still be around if the economic doomsday scenarios being tossed around become reality.  

Good, but not great
When the economy starts to tank and people shut their wallets, stocks that rely on spend-happy consumers can get slammed. Sure, there're plenty of cool toys out there, like Crocs (NASDAQ:CROX) shoes and Apple (NASDAQ:AAPL) iPods, but how far down on people's list of necessities are those products?

Here are five stocks that are likely to keep humming come rain, shine, high gas prices, housing woes, or anything else the economy can throw at 'em.

It isn't just cheap gas people are after, it's cheap everything. Costco's a unique retailer because it truly helps people save money when they buy in bulk, on everything from diapers to peanuts. When the economy is bustling, it's efficiency and convenience that catch people's attention. Now that inflation is making consumers more price-sensitive to everyday purchases, companies like Costco can capitalize on what they do best: provide value.

eBay is in a similar situation to Costco. Its services are great for two things: finding cheap merchandise, and selling stuff you don't need anymore -- both of which are fantastic for consumers strapped for cash. eBay's also great from a weak dollar perspective because its global reach makes products sold in U.S. dollars cheaper to foreign customers paying in stronger currencies.

Johnson & Johnson (NYSE:JNJ)
No matter how dire the economy gets, people all over the world need abundant access to medical goods. A company like J&J gets an added kick because so many of its products have brand recognition -- for example, Tylenol and Band-Aid -- that it'll likely be able to raise prices in lockstep with inflation. When brand dominance combines with an industry as important as medicine and first aid, you've got yourself a pretty solid company. Throw in great international exposure, an aging population, and a 2.8% dividend that's been raised every year for 40-plus years, and J&J has the prospects to keep its success story going for years to come.

Philip Morris International (NYSE:PM)
If you can look past the moral issues attached to investing in cigarette companies, newly independent Philip Morris International might be one of the strongest global success stories in years. It isn't too often that you find a company with roots in America that's exclusively removed from the U.S. economy, and that's part of what makes PMI so alluring. Many big global growth stories, such as China, India, Russia, and Brazil, have phenomenal growth potential waiting to be tapped by Philip Morris' trademark brand: Marlboro.

Deere (NYSE:DE)
More than 1 billion people live on less than $1 a day, but that number could be cut in half by 2030, according to former World Bank Chief Economist Francois Bourguignon. When someone living on pennies gets a bump in income, what do you think their first upgrade is likely to be? Food! As one of the largest global agriculture-machinery manufacturers, Deere could profit handsomely from a worldwide commodities boom that makes farming more lucrative.

Don't fight it
Fads come and go, and economies boom and bust, but certain industries are more likely than not to hold strong or even benefit in the wake of an economic downturn. Trying to time a business cycle is nearly impossible; spotting new trends when the market shuns risk might be even harder than that.

Sticking to established, easy-to-understand businesses that can take on the economy's wobbles is one of your best chances to show a recession who the boss is, no matter how bad it gets.

For related Foolishness: