本文整理汇总了Java中org.apache.ibatis.reflection.factory.ObjectFactory.create方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectFactory.create方法的具体用法?Java ObjectFactory.create怎么用?Java ObjectFactory.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ibatis.reflection.factory.ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory.create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: instantiatePropertyValue
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
public MetaObject instantiatePropertyValue(String name,
PropertyTokenizer prop, ObjectFactory objectFactory) {
MetaObject metaValue;
Class<?> type = getSetterType(prop.getName());
try {
Object newObject = objectFactory.create(type);
metaValue = MetaObject.forObject(newObject,
metaObject.getObjectFactory(),
metaObject.getObjectWrapperFactory());
set(prop, newObject);
} catch (Exception e) {
throw new ReflectionException("Cannot set value of property '"
+ name + "' because '" + name
+ "' is null and cannot be instantiated on instance of "
+ type.getName() + ". Cause:" + e.toString(), e);
}
return metaValue;
}
示例2: instantiatePropertyValue
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@Override
public MetaObject instantiatePropertyValue(String name, PropertyTokenizer prop, ObjectFactory objectFactory) {
MetaObject metaValue;
Class<?> type = getSetterType(prop.getName());
try {
Object newObject = objectFactory.create(type);
metaValue = MetaObject.forObject(newObject, metaObject.getObjectFactory(), metaObject.getObjectWrapperFactory(), metaObject.getReflectorFactory());
set(prop, newObject);
} catch (Exception e) {
throw new ReflectionException("Cannot set value of property '" + name + "' because '" + name + "' is null and cannot be instantiated on instance of " + type.getName() + ". Cause:" + e.toString(), e);
}
return metaValue;
}
示例3: DefaultMapResultHandler
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public DefaultMapResultHandler(String mapKey, ObjectFactory objectFactory, ObjectWrapperFactory objectWrapperFactory, ReflectorFactory reflectorFactory) {
this.objectFactory = objectFactory;
this.objectWrapperFactory = objectWrapperFactory;
this.reflectorFactory = reflectorFactory;
this.mappedResults = objectFactory.create(Map.class);
this.mapKey = mapKey;
}
示例4: instantiatePropertyValue
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@Override
public MetaObject instantiatePropertyValue(String name, PropertyTokenizer prop, ObjectFactory objectFactory) {
MetaObject metaValue;
Class<?> type = getSetterType(prop.getName());
try {
Object newObject = objectFactory.create(type);
metaValue = MetaObject.forObject(newObject, metaObject.getObjectFactory(), metaObject.getObjectWrapperFactory());
set(prop, newObject);
} catch (Exception e) {
throw new ReflectionException("Cannot set value of property '" + name + "' because '" + name + "' is null and cannot be instantiated on instance of " + type.getName() + ". Cause:" + e.toString(), e);
}
return metaValue;
}
示例5: DefaultMapResultHandler
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public DefaultMapResultHandler(String mapKey, ObjectFactory objectFactory, ObjectWrapperFactory objectWrapperFactory) {
this.objectFactory = objectFactory;
this.objectWrapperFactory = objectWrapperFactory;
this.mappedResults = objectFactory.create(Map.class);
this.mapKey = mapKey;
}
示例6: DefaultResultHandler
import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public DefaultResultHandler(ObjectFactory objectFactory) {
list = objectFactory.create(List.class);
}