xuxiuxi
2017-07-25 88d65ef2efe3420c005ac766eab9904624893e0f
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);
        } 
    }
 
}