private boolean isJoda ( Class < ? > clazz ) { for ( Constructor < ? > each : clazz . getConstructors ( ) ) { Class < ? > [ ] parameterTypes = each . getParameterTypes ( ) ; if ( parameterTypes . length > 0 ) { if ( parameterTypes [ 0 ] . getName ( ) . startsWith ( "org.joda.time." ) ) { return true ; } } } return false ; }
Check if joda date time library is used without introducing runtime dependency .