ManyAuthoritiesFactory changes for revisions 26211:26290

Changes in this commit do not apply to SIS: we do not provide a getProxy() method, and we abandon the FactoryFinder classes (to be replaced by dependency injections).

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r26211:26290 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/ManyAuthoritiesFactory.java
Revision 26211Revision 26290
* by {@code "EPSG:"}, then this class delegates the object creation to one of the authority
* factories provided to the constructor.
* <p>
* This class is not registered in {@link ReferencingFactoryFinder}, because it is not a real
* authority factory. There is not a single authority name associated to this factory, but rather
* a set of names determined from all available authority factories.
*
* by {@code "EPSG:"}, then this class delegates the object creation to one of the authority
* factories provided to the constructor.
* <p>
* This class is not registered in {@link GeometryFactoryFinder}, because it is not a real
* authority factory. There is not a single authority name associated to this factory, but rather
* a set of names determined from all available authority factories.
*
/**
 * A set of user-specified factories to try before to delegate to
 * {@link ReferencingFactoryFinder}, or {@code null} if none.
 */
private final Collection/*<AuthorityFactory>*/ factories;
/**
 * A set of user-specified factories to try before to delegate to
 * {@link GeometryFactoryFinder}, or {@code null} if none.
 */
private final Collection/*<AuthorityFactory>*/ factories;
 *
 * @param userHints An optional set of hints, or {@code null} if none.
 * @param factories A set of user-specified factories to try before to delegate
 *        to {@link ReferencingFactoryFinder}.
 */
public ManyAuthoritiesFactory(final Hints userHints,
        final Collection/*<? extends AuthorityFactory>*/ factories)
 *
 * @param userHints An optional set of hints, or {@code null} if none.
 * @param factories A set of user-specified factories to try before to delegate
 *        to {@link GeometryFactoryFinder}.
 */
public ManyAuthoritiesFactory(final Hints userHints,
        final Collection/*<? extends AuthorityFactory>*/ factories)
/**
 * Searchs for a factory of the given type. This method first search in user-supplied
 * factories. If no user factory is found, then this method request for a factory using
 * {@link ReferencingFactoryFinder}. The authority name is inferred from the specified code.
 *
 * @param  type The interface to be implemented.
 * @param  code The code of the object to create.
/**
 * Searchs for a factory of the given type. This method first search in user-supplied
 * factories. If no user factory is found, then this method request for a factory using
 * {@link GeometryFactoryFinder}. The authority name is inferred from the specified code.
 *
 * @param  type The interface to be implemented.
 * @param  code The code of the object to create.
 * Returns the user-supplied factories.
 */
final Collection getFactories() {
    return ((ManyAuthoritiesFactory) proxy.getAuthorityFactory()).factories;
}

/**
 * Returns the user-supplied factories.
 */
final Collection getFactories() {
    return ((ManyAuthoritiesFactory) getProxy().getAuthorityFactory()).factories;
}

/**
}
if (factory instanceof AbstractAuthorityFactory) {
    final IdentifiedObjectFinder finder = ((AbstractAuthorityFactory) factory).
            getIdentifiedObjectFinder(proxy.getType());
    if (finder != null) {
        finder.setFullScanAllowed(isFullScanAllowed());
        return finder;
}
if (factory instanceof AbstractAuthorityFactory) {
    final IdentifiedObjectFinder finder = ((AbstractAuthorityFactory) factory).
            getIdentifiedObjectFinder(getProxy().getType());
    if (finder != null) {
        finder.setFullScanAllowed(isFullScanAllowed());
        return finder;