Package org.jdesktop.beansbinding
Class Binding.SyncFailure
- java.lang.Object
-
- org.jdesktop.beansbinding.Binding.SyncFailure
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.RuntimeException
getConversionException()
Returns the exception that occurred during conversion if this failure represents a conversion failure.Binding.SyncFailureType
getType()
Returns the type of failure.Validator.Result
getValidationResult()
Returns the result that was returned from theBinding's
validator if this failure represents a validation failure.java.lang.String
toString()
Returns a string representation of theSyncFailure
.
-
-
-
Method Detail
-
getType
public Binding.SyncFailureType getType()
Returns the type of failure.- Returns:
- the type of failure
-
getConversionException
public java.lang.RuntimeException getConversionException()
Returns the exception that occurred during conversion if this failure represents a conversion failure. ThrowsUnsupportedOperationException
otherwise.- Returns:
- the exception that occurred during conversion
- Throws:
java.lang.UnsupportedOperationException
- if the type of failure is notSyncFailureType.CONVERSION_FAILED
-
getValidationResult
public Validator.Result getValidationResult()
Returns the result that was returned from theBinding's
validator if this failure represents a validation failure. ThrowsUnsupportedOperationException
otherwise.- Returns:
- the result that was returned from the
Binding's
validator - Throws:
java.lang.UnsupportedOperationException
- if the type of failure is notSyncFailureType.VALIDATION_FAILED
-
toString
public java.lang.String toString()
Returns a string representation of theSyncFailure
. This method is intended to be used for debugging purposes only, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not benull
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this
SyncFailure
-
-