src/java.base/share/classes/java/lang/ClassLoader.java
changeset 49528 c1eb35eb5f38
parent 49511 ba93b3928e7c
child 50634 c349d409262a
equal deleted inserted replaced
49527:5aa40f834b50 49528:c1eb35eb5f38
   697     }
   697     }
   698 
   698 
   699     /**
   699     /**
   700      * Finds the class with the given <a href="#binary-name">binary name</a>
   700      * Finds the class with the given <a href="#binary-name">binary name</a>
   701      * in a module defined to this class loader.
   701      * in a module defined to this class loader.
   702      * Class loader implementations that support the loading from modules
   702      * Class loader implementations that support loading from modules
   703      * should override this method.
   703      * should override this method.
   704      *
   704      *
   705      * @apiNote This method returns {@code null} rather than throwing
   705      * @apiNote This method returns {@code null} rather than throwing
   706      *          {@code ClassNotFoundException} if the class could not be found.
   706      *          {@code ClassNotFoundException} if the class could not be found.
   707      *
   707      *
  1279 
  1279 
  1280     // -- Resources --
  1280     // -- Resources --
  1281 
  1281 
  1282     /**
  1282     /**
  1283      * Returns a URL to a resource in a module defined to this class loader.
  1283      * Returns a URL to a resource in a module defined to this class loader.
  1284      * Class loader implementations that support the loading from modules
  1284      * Class loader implementations that support loading from modules
  1285      * should override this method.
  1285      * should override this method.
  1286      *
  1286      *
  1287      * @apiNote This method is the basis for the {@link
  1287      * @apiNote This method is the basis for the {@link
  1288      * Class#getResource Class.getResource}, {@link Class#getResourceAsStream
  1288      * Class#getResource Class.getResource}, {@link Class#getResourceAsStream
  1289      * Class.getResourceAsStream}, and {@link Module#getResourceAsStream
  1289      * Class.getResourceAsStream}, and {@link Module#getResourceAsStream
  1415      * {@code getResource(String)} method would return.
  1415      * {@code getResource(String)} method would return.
  1416      *
  1416      *
  1417      * @param  name
  1417      * @param  name
  1418      *         The resource name
  1418      *         The resource name
  1419      *
  1419      *
  1420      * @return  An enumeration of {@link java.net.URL URL} objects for
  1420      * @return  An enumeration of {@link java.net.URL URL} objects for the
  1421      *          the resource. If no resources could  be found, the enumeration
  1421      *          resource. If no resources could be found, the enumeration will
  1422      *          will be empty. Resources for which a {@code URL} cannot be
  1422      *          be empty. Resources for which a {@code URL} cannot be
  1423      *          constructed, are in package that is not opened unconditionally,
  1423      *          constructed, are in a package that is not opened
  1424      *          or access to the resource is denied by the security manager,
  1424      *          unconditionally, or access to the resource is denied by the
  1425      *          are not returned in the enumeration.
  1425      *          security manager, are not returned in the enumeration.
  1426      *
  1426      *
  1427      * @throws  IOException
  1427      * @throws  IOException
  1428      *          If I/O errors occur
  1428      *          If I/O errors occur
  1429      * @throws  NullPointerException If {@code name} is {@code null}
  1429      * @throws  NullPointerException If {@code name} is {@code null}
  1430      *
  1430      *