public static Object getFieldValue ( Object candidate , Field field ) { try { return ReflectUtils . getValue ( ReflectUtils . makeAccessible ( field ) , candidate ) ; } catch ( Exception e ) { throw BusinessException . wrap ( e , BusinessErrorCode . ERROR_ACCESSING_FIELD ) . put ( "className" , candidate . getClass ( ) ) . put ( "fieldName" , field . getName ( ) ) ; } }
Return the value contained in the specified field of the candidate object .