@Test public void test() { Resource resource = new Resource(); ResourceLoader loader1 = resource.getLoader(ContentHostingService.class.getName(), "bundle1"); ResourceLoader loader2 = resource.getLoader(ContentHostingService.class.getName(), "bundle2"); assertEquals("Bundle 1", loader1.getString("example")); assertEquals("Bundle 2", loader2.getString("example")); }
public ResourceLoader getLoader(String resourceClass, String resourceBundle) { ResourceLoader loader = null; try { loader = new ResourceLoader(resourceBundle, ComponentManager.get(resourceClass).getClass().getClassLoader()); } catch (Exception e) { log.warn("WARN: Localized bundle not found: " + e.toString()); } return loader; }
Resource { public ResourceLoader getLoader(String resourceClass, String resourceBundle) { ResourceLoader loader = null; try { loader = new ResourceLoader(resourceBundle, ComponentManager.get(resourceClass).getClass().getClassLoader()); } catch (Exception e) { log.warn("WARN: Localized bundle not found: " + e.toString()); } return loader; } }
Resource { public ResourceLoader getLoader(String resourceClass, String resourceBundle) { ResourceLoader loader = null; try { loader = new ResourceLoader(resourceBundle, ComponentManager.get(resourceClass).getClass().getClassLoader()); } catch (Exception e) { log.warn("WARN: Localized bundle not found: " + e.toString()); } return loader; } Resource(); }
Resource { public ResourceLoader getLoader(String resourceClass, String resourceBundle) { ResourceLoader loader = null; try { loader = new ResourceLoader(resourceBundle, ComponentManager.get(resourceClass).getClass().getClassLoader()); } catch (Exception e) { log.warn("WARN: Localized bundle not found: " + e.toString()); } return loader; } Resource(); ResourceLoader getLoader(String resourceClass, String resourceBundle); }
Resource { public ResourceLoader getLoader(String resourceClass, String resourceBundle) { ResourceLoader loader = null; try { loader = new ResourceLoader(resourceBundle, ComponentManager.get(resourceClass).getClass().getClassLoader()); } catch (Exception e) { log.warn("WARN: Localized bundle not found: " + e.toString()); } return loader; } Resource(); ResourceLoader getLoader(String resourceClass, String resourceBundle);  }