businessfactory.java

来自「网上购物系统的简易代码」· Java 代码 · 共 18 行

JAVA
18
字号
package com.tarena.develop.common;

import java.util.HashMap;
import java.util.Map;

import com.tarena.develop.service.impl.ProductService;
import com.tarena.develop.service.impl.ProductServiceImpl;

public class BusinessFactory {
	private static Map bizFac = new HashMap();
	static{
		bizFac.put(ProductService.class.getName(), new ProductServiceImpl());
	}
	public static Object getBusiness(String interfaceName){
		return bizFac.get(interfaceName);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?