private boolean isWorkMethodSynchronized ( Class < ? extends Work > workClass , String methodName ) { try { Method method = SecurityActions . getMethod ( workClass , methodName , new Class [ 0 ] ) ; if ( Modifier . isSynchronized ( method . getModifiers ( ) ) ) return true ; } catch ( NoSuchMethodException e ) { //Never happens, Work implementation should have these methods } return false ; }
Checks if Work implementation class method is synchronized