xuxiuxi
2017-07-31 3be560df41e1287577b751870b0cf95dab9c114c
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);
        } 
    }
 
}