本文整理匯總了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;