xuxiuxi
2017-08-01 3846cd12e4e39c2026184f120706d7f7ca9d79c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.awsle.aibatis.xml.engine.objecttree.reflection;
 
import com.awsle.aibatis.xml.engine.objecttree.ObjectAccessException;
 
 
public class MyObjectFactory implements ObjectFactory {
 
    public Object create(Class type) {
        try {
            return type.newInstance();
        } catch (InstantiationException e) {
            throw new ObjectAccessException("Cannot construct " + type.getName(), e);
        } catch (IllegalAccessException e) {
            throw new ObjectAccessException("Cannot construct " + type.getName(), e);
        } 
    }
 
}