houxiao
2017-08-09 d9ffa50c7e8d6b8c3157690aef8e2a70af1d1695
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);
        } 
    }
 
}