private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { if (!optional) { String errMsg = "Could not find resource corresponding to [" + resourceAttribute + "]"; addError(errMsg); } return null; } else return url; }
url = Loader.getResourceBySelfClassLoader(location); throw new MalformedURLException("path is required"); url = Loader.getResourceBySelfClassLoader(path);
/** * Returns the string "true" if the {@link #setResource(String) resource} specified by the * user is available on the class path, "false" otherwise. * * @return "true"|"false" depending on the availability of resource on the classpath */ public String getPropertyValue() { if (OptionHelper.isEmpty(resourceStr)) { addError("The \"resource\" property must be set."); return null; } URL resourceURL = Loader.getResourceBySelfClassLoader(resourceStr); return booleanAsStr(resourceURL != null); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
String resource = attributes.getValue(RESOURCE_ATTRIBUTE); resource = ec.subst(resource); URL resourceURL = Loader.getResourceBySelfClassLoader(resource); if (resourceURL == null) { addError("Could not find resource [" + resource + "].");
private URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { optionalWarning("Could not find resource corresponding to [" + resourceAttribute + "]", null); return null; } else return url; }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { String errMsg = "Could not find resource corresponding to [" + resourceAttribute + "]"; addError(errMsg); return null; } else return url; }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { optionalWarning("Could not find resource corresponding to [" + resourceAttribute + "]"); return null; } else return url; }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { String errMsg = "Could not find resource corresponding to [" + resourceAttribute + "]"; addError(errMsg); return null; } else return url; }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { optionalWarning("Could not find resource corresponding to [" + resourceAttribute + "]"); return null; } else return url; }
URL resourceAsURL(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { optionalWarning("Could not find resource corresponding to [" + resourceAttribute + "]"); return null; } else return url; }
private InputStream getInputStreamByResource(String resourceAttribute) { URL url = Loader.getResourceBySelfClassLoader(resourceAttribute); if (url == null) { String errMsg = "Could not find resource corresponding to [" + resourceAttribute + "]"; addError(errMsg); return null; } return openURL(url); }
static void configureViaXML_File() { LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); try { JoranConfigurator configurator = new JoranConfigurator(); configurator.setContext(lc); lc.reset(); URL url = Loader.getResourceBySelfClassLoader("chapters/mdc/simpleMDC.xml"); configurator.doConfigure(url); } catch (JoranException je) { StatusPrinter.print(lc); } }
/** * Returns the string "true" if the {@link #setResource(String) resource} specified by the * user is available on the class path, "false" otherwise. * * @return "true"|"false" depending on the availability of resource on the classpath */ public String getPropertyValue() { if (OptionHelper.isEmpty(resourceStr)) { addError("The \"resource\" property must be set."); return null; } URL resourceURL = Loader.getResourceBySelfClassLoader(resourceStr); return booleanAsStr(resourceURL != null); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }
private URL urlByResourceName(StatusManager sm, String resourceName) { sm.add(new InfoStatus("Searching for [" + resourceName + "]", this)); URL url = Loader.getResource(resourceName, Loader.getTCL()); if (url != null) { return url; } return Loader.getResourceBySelfClassLoader(resourceName); }