/** * Creates a finder using the specified factory. This constructor is protected because instances * of this class should not be created directly. Use {@link * AbstractAuthorityFactory#getIdentifiedObjectFinder} instead. * * @param factory The factory to scan for the identified objects. * @param type The type of objects to lookup. */ protected IdentifiedObjectFinder( final AuthorityFactory factory, final Class /*<? extends IdentifiedObject>*/ type) { setProxy(AuthorityFactoryProxy.getInstance(factory, type)); }
proxy = AuthorityFactoryProxy.getInstance(factory, GeographicCRS.class); assertTrue(proxy.getClass().getName().endsWith("Geographic")); assertSame(expected, proxy.create("83")); assertSame(expected, proxy.create("CRS:83")); proxy = AuthorityFactoryProxy.getInstance(factory, CoordinateReferenceSystem.class); assertTrue(proxy.getClass().getName().endsWith("CRS")); assertSame(expected, proxy.create("83")); assertSame(expected, proxy.create("CRS:83")); proxy = AuthorityFactoryProxy.getInstance(factory, IdentifiedObject.class); assertTrue(proxy.getClass().getName().endsWith("Default")); assertSame(expected, proxy.create("83")); proxy = AuthorityFactoryProxy.getInstance(factory, ProjectedCRS.class); assertTrue(proxy.getClass().getName().endsWith("Projected")); try { proxy = AuthorityFactoryProxy.getInstance(factory, TemporalCRS.class); assertTrue(proxy.getClass().getName().endsWith("Default")); try {
worker.findCache = findCache; setProxy(AuthorityFactoryProxy.getInstance(worker, type));