public void setValidators ( final Iterable < Validator < ? > > validators ) { this . validators . clear ( ) ; for ( final Validator < ? > validator : validators ) { // this ensures we map OptionalConfigurationComponent classes to validators of the same class this . validators . put ( validator . getSupportedClass ( ) , validator ) ; } }
Set the validators used by the service . This will clear any existing validators . This method is thread safe .