javax.beans.binding
Class BindingValidator

java.lang.Object
  extended by javax.beans.binding.BindingValidator

public abstract class BindingValidator
extends java.lang.Object

BindingValidator is responsible for validating the value from the target of a Binding. Before the target value is set on the source, the value is passed to the BindingValidator. BindingValidator signals an invalid value by returning a non-null value from the validate method. All ValidationResults are forwarded to any BindingListeners attached to the BindingContext.

See Also:
BindingContext, ValidationResult, BindingListener

Constructor Summary
BindingValidator()
           
 
Method Summary
abstract  ValidationResult validate(Binding binding, java.lang.Object value)
          Validates a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingValidator

public BindingValidator()
Method Detail

validate

public abstract ValidationResult validate(Binding binding,
                                          java.lang.Object value)
Validates a value. An invalid value is identified by returning a non-null value from this method.

Parameters:
binding - the binding
value - the value to validate, may be null
Throws:
java.lang.IllegalArgumentException - if binding is null