@Test public void gridCoverageLayerHelper() throws Exception { float[][] data = { {1, 2, 3, 4}, {5, 6, 7, 8} }; ReferencedEnvelope env = new ReferencedEnvelope(0, 4, 0, 2, null); GridCoverageFactory gcf = CoverageFactoryFinder.getGridCoverageFactory(null); GridCoverage2D cov = gcf.create("coverage", data, env); Layer layer = new GridCoverageLayer(cov, null); InfoToolHelper helper = InfoToolHelperLookup.getHelper(layer); assertNotNull(helper); assertEquals(GridCoverageLayerHelper.class, helper.getClass()); }
public static InfoToolHelper getHelper(Layer layer) { loadProviders(); for (InfoToolHelper helper : cachedInstances) { try { if (helper.isSupportedLayer(layer)) { return helper.getClass().getDeclaredConstructor().newInstance(); } } catch (Exception ex) { throw new RuntimeException(ex); } } return null; }
InfoToolHelperLookup { public static InfoToolHelper getHelper(Layer layer) { loadProviders(); for (InfoToolHelper helper : cachedInstances) { try { if (helper.isSupportedLayer(layer)) { return helper.getClass().getDeclaredConstructor().newInstance(); } } catch (Exception ex) { throw new RuntimeException(ex); } } return null; } }
InfoToolHelperLookup { public static InfoToolHelper getHelper(Layer layer) { loadProviders(); for (InfoToolHelper helper : cachedInstances) { try { if (helper.isSupportedLayer(layer)) { return helper.getClass().getDeclaredConstructor().newInstance(); } } catch (Exception ex) { throw new RuntimeException(ex); } } return null; }  }
InfoToolHelperLookup { public static InfoToolHelper getHelper(Layer layer) { loadProviders(); for (InfoToolHelper helper : cachedInstances) { try { if (helper.isSupportedLayer(layer)) { return helper.getClass().getDeclaredConstructor().newInstance(); } } catch (Exception ex) { throw new RuntimeException(ex); } } return null; }  static InfoToolHelper getHelper(Layer layer); }
InfoToolHelperLookup { public static InfoToolHelper getHelper(Layer layer) { loadProviders(); for (InfoToolHelper helper : cachedInstances) { try { if (helper.isSupportedLayer(layer)) { return helper.getClass().getDeclaredConstructor().newInstance(); } } catch (Exception ex) { throw new RuntimeException(ex); } } return null; }  static InfoToolHelper getHelper(Layer layer);  }