wuluozhuang
2017-07-21 ec13e70341c00ee0495f3f2053b5b1a3a7f5c27b
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);
        } 
    }
 
}