protected URL findResource (String moduleName, String name) throws IOException

Returns a URL to a resource in a module defined to this class loader. Class loader implementations that support the loading from modules should override this method.

Parameters:
moduleName     The module name; or null to find a resource in the unnamed module for this class loader
name     The resource name

Returns:  A URL to the resource; null if the resource could not be found, a URL could not be constructed to locate the resource, access to the resource is denied by the security manager, or there isn't a module of the given name defined to the class loader.

Exceptions:
IOException     If I/O errors occur

See also:
java.lang.module.ModuleReader.find(String)

Since:  9

@apiNote This method is the basis for the Class.getResource, Class.getResourceAsStream, and Module.getResourceAsStream methods. It is not subject to the rules for encapsulation specified by Module.getResourceAsStream.
@implSpec The default implementation attempts to find the resource by invoking findResource(String) when the moduleName is null. It otherwise returns null.
@spec JPMS