public class PropertySettingNotSupportedException extends PipelinedComparatorException
Thrown to indicate a problem setting a property with an unsupported value or type.
Properties provide an extensible mechanism for configuring the operation of the pipeline. Unlike features these methods accept or provide complex String, or more generally Object, values rather than booleans. They are used in different contexts:
PipelinedComparator#setParserProperty(String, Object)
PipelinedComparator#setComparatorProperty(String, Object)
PipelinedComparator#setOutputProperty(String, String)
In certain circumstances the acceptable types and values which can be assigned are restricted. This exception is used to
indicate when these restrictions have been broken. The PropertySettingNotSupportedException.getSuppliedClass()
can be used to report the Class of argument
supplied, while PropertySettingNotSupportedException.getRequiredClass()
lists the class with which the supplied value must be assignment compatible.
PipelinedComparator#setParserProperty(String, Object)
,
PipelinedComparator#setComparatorProperty(String, Object)
,
PipelinedComparator#setOutputProperty(String, String)
,
Serialized FormConstructor and Description |
---|
PropertySettingNotSupportedException(java.lang.String message,
java.lang.String propertyName,
java.lang.Class<?> suppliedClass)
Creates a new PropertySettingNotSupportedException.
|
PropertySettingNotSupportedException(java.lang.String message,
java.lang.String propertyName,
java.lang.Class<?> suppliedClass,
java.lang.Class<?> requiredClass)
Creates a new PropertySettingNotSupportedException.
|
PropertySettingNotSupportedException(java.lang.String message,
java.lang.Throwable e,
java.lang.String propertyName,
java.lang.Class<?> suppliedClass,
java.lang.Class<?> requiredClass)
Creates a new PropertySettingNotSupportedException.
|
PropertySettingNotSupportedException(java.lang.Throwable e,
java.lang.String propertyName,
java.lang.Class<?> suppliedClass,
java.lang.Class<?> requiredClass)
Creates a new PropertySettingNotSupportedException.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPropertyName()
Reports the property name which was being set.
|
java.lang.Class<?> |
getRequiredClass()
Reports the Class to which the supplied value must be assignment compatible.
|
java.lang.Class<?> |
getSuppliedClass()
Reports the Class of the value supplied when trying to set the property.
|
getCause, getThrowable
public PropertySettingNotSupportedException(java.lang.String message, java.lang.Throwable e, java.lang.String propertyName, java.lang.Class<?> suppliedClass, java.lang.Class<?> requiredClass)
message
- The message stringe
- A nested throwable should it have lead to this exceptionpropertyName
- the name of the property that caused the problemsuppliedClass
- the class of the supplied valuerequiredClass
- the class which the supplied value should be compatible withpublic PropertySettingNotSupportedException(java.lang.String message, java.lang.String propertyName, java.lang.Class<?> suppliedClass)
message
- The message stringpropertyName
- the name of the property being set or requestedsuppliedClass
- the class of the supplied valuepublic PropertySettingNotSupportedException(java.lang.String message, java.lang.String propertyName, java.lang.Class<?> suppliedClass, java.lang.Class<?> requiredClass)
message
- The message stringpropertyName
- the name of the property being set or requestedsuppliedClass
- the class of the supplied valuerequiredClass
- the class which the supplied value should be compatible withpublic PropertySettingNotSupportedException(java.lang.Throwable e, java.lang.String propertyName, java.lang.Class<?> suppliedClass, java.lang.Class<?> requiredClass)
e
- A nested throwable should it have lead to this exceptionpropertyName
- the name of the property being set or requestedsuppliedClass
- the class of the supplied valuerequiredClass
- the class which the supplied value should be compatible withpublic java.lang.Class<?> getSuppliedClass()
public java.lang.Class<?> getRequiredClass()
public java.lang.String getPropertyName()