static void validateOpts ( Object instance ) { if ( ! onClasspath ( JSR303_1_0_CLASSNAME ) ) { return ; } try { Object validator = getValidator ( ) ; Method validate = validator . getClass ( ) . getMethod ( "validateOpts" , Object . class ) ; validate . invoke ( validator , instance ) ; } catch ( InvocationTargetException e ) { if ( e . getTargetException ( ) instanceof RuntimeException ) { throw ( RuntimeException ) e . getTargetException ( ) ; } throw new RuntimeException ( e . getTargetException ( ) ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Throwable e ) { throw new RuntimeException ( e ) ; } }
Validate that the options if Bean Validation is available on classpath .