org.springframework.beans.ConfigurablePropertyAccessor#isWritableProperty ( )源码实例Demo

下面列出了org.springframework.beans.ConfigurablePropertyAccessor#isWritableProperty ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: onetwo   文件: BeanPropertiesMapper.java
protected void setPropertyValue(Object obj, ConfigurablePropertyAccessor bw, String propertyName, Object value){
	if(!bw.isWritableProperty(propertyName)){
		if(!ignoreNotFoundProperty){
			throw new NoSuchElementException("no setter found for property: " + propertyName+", target: " + obj);
		}
		logger.debug("ignore property: {}={} ", propertyName, value);
		return ;
	}
	bw.setPropertyValue(propertyName, value);
	if(logger.isDebugEnabled()){
		logger.debug("set property: {}={} ", propertyName, value);
	}
}
 
源代码2 项目: onetwo   文件: ConfigableBeanMapper.java
protected void setPropertyValue(Object obj, ConfigurablePropertyAccessor bw, String propertyName, Object value){
	if(!bw.isWritableProperty(propertyName)){
		if(!ignoreNotFoundProperty){
			throw new NoSuchElementException("no setter found for property: " + propertyName+", target: " + obj);
		}
		logger.debug("ignore property: {}={} ", propertyName, value);
		return ;
	}
	bw.setPropertyValue(propertyName, value);
	if(logger.isDebugEnabled()){
		logger.debug("set property: {}={} ", propertyName, value);
	}
}
 
源代码3 项目: AlgoTrader   文件: GrailsDataBinder.java
private boolean isNullAndWritableProperty(ConfigurablePropertyAccessor accessor, String propertyName) {
	return accessor.isWritableProperty(propertyName) && (accessor.isReadableProperty(propertyName) && accessor.getPropertyValue(propertyName) == null);
}