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); } } }