class BeanFactory {

    public Object getBean(String beanId) {
        Object obj = null;
        // 从bean标签集合中获取id一样的
        for (BeanDefined beanDefined : beanDefineds) {
            if (beanDefined.getBeanId().equals(beanId)) {
                // 构造出正确的类
                String classPath = beanDefined.getClassPath();
                try {
                    Class classFile = Class.forName(classPath);
                    obj = classFile.newInstance();
                    return obj;
                } catch (ClassNotFoundException e) {
                    System.err.println("当前类文件不存在");
                    e.printStackTrace();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
        return obj;

    }

    public  BeanFactory(List<BeanDefined> beanDefineds);

}