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


Java PropertyTokenizer.hasNext方法代码示例

本文整理汇总了Java中org.apache.ibatis.reflection.property.PropertyTokenizer.hasNext方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyTokenizer.hasNext方法的具体用法?Java PropertyTokenizer.hasNext怎么用?Java PropertyTokenizer.hasNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ibatis.reflection.property.PropertyTokenizer的用法示例。


在下文中一共展示了PropertyTokenizer.hasNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hasGetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public boolean hasGetter(String name) {
	PropertyTokenizer prop = new PropertyTokenizer(name);
	if (prop.hasNext()) {
		if (metaClass.hasGetter(prop.getIndexedName())) {
			MetaObject metaValue = metaObject.metaObjectForProperty(prop
					.getIndexedName());
			if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
				return metaClass.hasGetter(name);
			} else {
				return metaValue.hasGetter(prop.getChildren());
			}
		} else {
			return false;
		}
	} else {
		return metaClass.hasGetter(name);
	}
}
 
开发者ID:yinshipeng,项目名称:sosoapi-base,代码行数:19,代码来源:BeanWrapper.java

示例2: getSetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public Class<?> getSetterType(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      return Object.class;
    } else {
      return metaValue.getSetterType(prop.getChildren());
    }
  } else {
    if (map.get(name) != null) {
      return map.get(name).getClass();
    } else {
      return Object.class;
    }
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:19,代码来源:MapWrapper.java

示例3: getGetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public Class<?> getGetterType(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      return Object.class;
    } else {
      return metaValue.getGetterType(prop.getChildren());
    }
  } else {
    if (map.get(name) != null) {
      return map.get(name).getClass();
    } else {
      return Object.class;
    }
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:19,代码来源:MapWrapper.java

示例4: hasSetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public boolean hasSetter(String name) {
	PropertyTokenizer prop = new PropertyTokenizer(name);
	if (prop.hasNext()) {
		if (metaClass.hasSetter(prop.getIndexedName())) {
			MetaObject metaValue = metaObject.metaObjectForProperty(prop
					.getIndexedName());
			if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
				return metaClass.hasSetter(name);
			} else {
				return metaValue.hasSetter(prop.getChildren());
			}
		} else {
			return false;
		}
	} else {
		return metaClass.hasSetter(name);
	}
}
 
开发者ID:yinshipeng,项目名称:sosoapi-base,代码行数:19,代码来源:BeanWrapper.java

示例5: hasSetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public boolean hasSetter(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    if (metaClass.hasSetter(prop.getIndexedName())) {
      MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
      if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
        return metaClass.hasSetter(name);
      } else {
        return metaValue.hasSetter(prop.getChildren());
      }
    } else {
      return false;
    }
  } else {
    return metaClass.hasSetter(name);
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:19,代码来源:BeanWrapper.java

示例6: setValue

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public void setValue(String name, Object value) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      if (value == null && prop.getChildren() != null) {
        // don't instantiate child path if value is null
        return;
      } else {
        metaValue = objectWrapper.instantiatePropertyValue(name, prop, objectFactory);
      }
    }
    metaValue.setValue(prop.getChildren(), value);
  } else {
    objectWrapper.set(prop, value);
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:18,代码来源:MetaObject.java

示例7: getGetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public Class<?> getGetterType(String name) {
	PropertyTokenizer prop = new PropertyTokenizer(name);
	if (prop.hasNext()) {
		MetaObject metaValue = metaObject.metaObjectForProperty(prop
				.getIndexedName());
		if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
			return Object.class;
		} else {
			return metaValue.getGetterType(prop.getChildren());
		}
	} else {
		if (map.get(name) != null) {
			return map.get(name).getClass();
		} else {
			return Object.class;
		}
	}
}
 
开发者ID:yinshipeng,项目名称:sosoapi-base,代码行数:19,代码来源:MapWrapper.java

示例8: hasGetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public boolean hasGetter(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    if (map.containsKey(prop.getIndexedName())) {
      MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
      if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
        return true;
      } else {
        return metaValue.hasGetter(prop.getChildren());
      }
    } else {
      return false;
    }
  } else {
    return map.containsKey(prop.getName());
  }
}
 
开发者ID:txazo,项目名称:mybatis,代码行数:19,代码来源:MapWrapper.java

示例9: hasGetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public boolean hasGetter(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    if (metaClass.hasGetter(prop.getIndexedName())) {
      MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
      if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
        return metaClass.hasGetter(name);
      } else {
        return metaValue.hasGetter(prop.getChildren());
      }
    } else {
      return false;
    }
  } else {
    return metaClass.hasGetter(name);
  }
}
 
开发者ID:toulezu,项目名称:play,代码行数:19,代码来源:BeanWrapper.java

示例10: setValue

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public void setValue(String name, Object value) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      if (value == null && prop.getChildren() != null) {
        // don't instantiate child path if value is null
        //如果上层就是null了,还得看有没有儿子,没有那就结束
        return;
      } else {
          //否则还得new一个,委派给ObjectWrapper.instantiatePropertyValue
        metaValue = objectWrapper.instantiatePropertyValue(name, prop, objectFactory);
      }
    }
    //递归调用setValue
    metaValue.setValue(prop.getChildren(), value);
  } else {
      //到了最后一层了,所以委派给ObjectWrapper.set
    objectWrapper.set(prop, value);
  }
}
 
开发者ID:shurun19851206,项目名称:mybaties,代码行数:22,代码来源:MetaObject.java

示例11: getSetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public Class<?> getSetterType(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaClass metaProp = metaClassForProperty(prop.getName());
    return metaProp.getSetterType(prop.getChildren());
  } else {
    return reflector.getSetterType(prop.getName());
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:10,代码来源:MetaClass.java

示例12: hasSetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public boolean hasSetter(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    if (reflector.hasSetter(prop.getName())) {
      MetaClass metaProp = metaClassForProperty(prop.getName());
      return metaProp.hasSetter(prop.getChildren());
    } else {
      return false;
    }
  } else {
    return reflector.hasSetter(prop.getName());
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:14,代码来源:MetaClass.java

示例13: hasGetter

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
public boolean hasGetter(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    if (reflector.hasGetter(prop.getName())) {
      MetaClass metaProp = metaClassForProperty(prop);
      return metaProp.hasGetter(prop.getChildren());
    } else {
      return false;
    }
  } else {
    return reflector.hasGetter(prop.getName());
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:14,代码来源:MetaClass.java

示例14: getSetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public Class<?> getSetterType(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      return metaClass.getSetterType(name);
    } else {
      return metaValue.getSetterType(prop.getChildren());
    }
  } else {
    return metaClass.getSetterType(name);
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:15,代码来源:BeanWrapper.java

示例15: getGetterType

import org.apache.ibatis.reflection.property.PropertyTokenizer; //导入方法依赖的package包/类
@Override
public Class<?> getGetterType(String name) {
  PropertyTokenizer prop = new PropertyTokenizer(name);
  if (prop.hasNext()) {
    MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName());
    if (metaValue == SystemMetaObject.NULL_META_OBJECT) {
      return metaClass.getGetterType(name);
    } else {
      return metaValue.getGetterType(prop.getChildren());
    }
  } else {
    return metaClass.getGetterType(name);
  }
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:15,代码来源:BeanWrapper.java


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