当前位置: 首页>>代码示例>>Java>>正文


Java ObjectFactory.create方法代码示例

本文整理汇总了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;
}
 
开发者ID:yinshipeng,项目名称:sosoapi-base,代码行数:19,代码来源:BeanWrapper.java

示例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;
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:14,代码来源:BeanWrapper.java

示例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;
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:9,代码来源:DefaultMapResultHandler.java

示例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;
}
 
开发者ID:shurun19851206,项目名称:mybaties,代码行数:14,代码来源:BeanWrapper.java

示例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;
}
 
开发者ID:shurun19851206,项目名称:mybaties,代码行数:8,代码来源:DefaultMapResultHandler.java

示例6: DefaultResultHandler

import org.apache.ibatis.reflection.factory.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public DefaultResultHandler(ObjectFactory objectFactory) {
  list = objectFactory.create(List.class);
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:5,代码来源:DefaultResultHandler.java


注:本文中的org.apache.ibatis.reflection.factory.ObjectFactory.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。