本文整理汇总了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;
}
示例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);
}
}
示例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;