/** * Finds the resource with the specified name from the search path. This returns null if the resource is not found. * * @param name The resource name. * @return The URL that matches the resource. */ @Override protected URL findResource(final String name) { try { final Resource res = loadResource(name); if (res != null) { return res.getURL(); } return null; } catch (final Exception ignored) { return null; // TODO: report? } }
/** * Finds and loads the class with the specified name from the search path. * * @throws ClassNotFoundException if the class is not found. */ @Override protected Class<?> findClass(final String name) throws ClassNotFoundException { try { final String path = name.replace('.', '/').concat(".class"); final Resource res = loadResource(path); if (res == null) { throw new ClassNotFoundException(name); } return defineClass(name, res); } catch (final IOException ioe) { throw new ClassNotFoundException(name, ioe); } }
/** * Finds the resource with the specified name from the search path. This returns null if the resource is not found. * * @param name The resource name. * @return The URL that matches the resource. */ @Override protected URL findResource(final String name) { try { final Resource res = loadResource(name); if (res != null) { return res.getURL(); } return null; } catch (final Exception ignored) { return null; // TODO: report? } }
/** * Finds and loads the class with the specified name from the search path. * * @throws ClassNotFoundException if the class is not found. */ @Override protected Class<?> findClass(final String name) throws ClassNotFoundException { try { final String path = name.replace('.', '/').concat(".class"); final Resource res = loadResource(path); if (res == null) { throw new ClassNotFoundException(name); } return defineClass(name, res); } catch (final IOException ioe) { throw new ClassNotFoundException(name, ioe); } }
/** * Finds and loads the class with the specified name from the search path. * * @throws ClassNotFoundException if the class is not found. */ @Override protected Class<?> findClass(final String name) throws ClassNotFoundException { try { final String path = name.replace('.', '/').concat(".class"); final Resource res = loadResource(path); if (res == null) { throw new ClassNotFoundException(name); } return defineClass(name, res); } catch (final IOException ioe) { throw new ClassNotFoundException(name, ioe); } }
/** * Finds the resource with the specified name from the search path. This returns null if the resource is not found. * * @param name The resource name. * @return The URL that matches the resource. */ @Override protected URL findResource(final String name) { try { final Resource res = loadResource(name); if (res != null) { return res.getURL(); } return null; } catch (final Exception ignored) { return null; // TODO: report? } }