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


Java PropertyReadException类代码示例

本文整理汇总了Java中com.holonplatform.core.property.Property.PropertyReadException的典型用法代码示例。如果您正苦于以下问题:Java PropertyReadException类的具体用法?Java PropertyReadException怎么用?Java PropertyReadException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PropertyReadException类属于com.holonplatform.core.property.Property包,在下文中一共展示了PropertyReadException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deserialize

import com.holonplatform.core.property.Property.PropertyReadException; //导入依赖的package包/类
/**
 * Deserialize given property <code>value</code> from <code>application/x-www-form-urlencoded</code> media type.
 * @param property Property to deserialize
 * @param value Value to deserialize
 * @return Deserialized value
 * @throws PropertyReadException If an error occurred
 */
@SuppressWarnings("unchecked")
private <T> T deserialize(final Property<?> property, final String value) throws PropertyReadException {
	if (value != null) {
		return (T) getDeserializer().deserialize(property, value);
	}
	return null;
}
 
开发者ID:holon-platform,项目名称:holon-jaxrs,代码行数:15,代码来源:PropertyBoxFormDataProvider.java

示例2: getValueProviderPropertyValue

import com.holonplatform.core.property.Property.PropertyReadException; //导入依赖的package包/类
/**
 * Get value of a {@link VirtualProperty} using {@link PropertyValueProvider#getPropertyValue(PropertyBox)}.
 * @param <T> Property type
 * @param property Property
 * @return Property value
 * @throws PropertyAccessException Error obtaining property value from provider
 */
protected <T> T getValueProviderPropertyValue(VirtualProperty<T> property) throws PropertyAccessException {
	PropertyValueProvider<T> valueProvider = property.getValueProvider();
	if (valueProvider == null) {
		throw new PropertyReadException(property, "Property " + property
				+ " declares to provide a value using a PropertyValueProvider, but returned PropertyValueProvider is null");
	}
	try {
		return valueProvider.getPropertyValue(this);
	} catch (Exception e) {
		throw new PropertyReadException(property, e);
	}
}
 
开发者ID:holon-platform,项目名称:holon-core,代码行数:20,代码来源:AbstractPropertyBox.java

示例3: deserialize

import com.holonplatform.core.property.Property.PropertyReadException; //导入依赖的package包/类
/**
 * Deserialize given property <code>value</code> from <code>application/x-www-form-urlencoded</code> media type
 * String.
 * @param property Property to deserialize the value for
 * @param value Property value
 * @return Serialized value
 * @throws PropertyReadException If an error occurred
 */
Object deserialize(final Property<?> property, final String value) throws PropertyReadException;
 
开发者ID:holon-platform,项目名称:holon-jaxrs,代码行数:10,代码来源:FormDataPropertyValueDeserializer.java


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