hibernate/hibernate-search — pull request #602 by emmanuelbernard (2014-04-10 09:09:18+00:00)
Title: HSEARCH-1552 Split of BridgeFactory in providers and autodiscovery support

I feel like the work is in a good enough shape for a review before a push in master.

## What do I want from you

A final review on code, API, names etc. I am in particular not super happy with `DefaultBridgeProvider` and `BridgeProvider.returnFieldBridgeIfMatching`.

A discussion on the last commit which is Hardy's proposal to split the `BridgeProvider` contract into 2 methods.

## Remaining work

Compared to what we discussed I did not do :
- support for stereotype bridges
- support for annotation providing data to bridges (generalisation of `@DateBridge` and family)
- make use of `ServiceManager` to load bridge providers as service - the Service Loader code is literally 1 specific line in BridgeFactory as it is. Is it worth pursuing?
- change the `BridgeFactory` to be annotation agnostic
- split `BridgeFactory.guessType` into separated methods (one per annotation providing data, one for `@FieldBridge` and one for type based bridges)

For the last two points, I need to circle back with Hardy to be re-convinced.
All of these can be done in subsequent PRs.