src/share/classes/java/lang/ClassLoader.java

Print this page
rev 7588 : 8019862: Fix doclint errors in java.lang.*.
Summary: Fix doclint errors in java.lang.*
Reviewed-by: darcy
Contributed-by: Brian Burkhalter <brian.burkhalter@oracle.com>

*** 155,165 **** * &nbsp;.&nbsp;.&nbsp;. * } * } * </pre></blockquote> * ! * <h4> <a name="name">Binary names</a> </h4> * * <p> Any class name provided as a {@link String} parameter to methods in * <tt>ClassLoader</tt> must be a binary name as defined by * <cite>The Java&trade; Language Specification</cite>. * --- 155,165 ---- * &nbsp;.&nbsp;.&nbsp;. * } * } * </pre></blockquote> * ! * <h3> <a name="name">Binary names</a> </h3> * * <p> Any class name provided as a {@link String} parameter to methods in * <tt>ClassLoader</tt> must be a binary name as defined by * <cite>The Java&trade; Language Specification</cite>. *
*** 340,350 **** * Loads the class with the specified <a href="#name">binary name</a>. * This method searches for classes in the same manner as the {@link * #loadClass(String, boolean)} method. It is invoked by the Java virtual * machine to resolve class references. Invoking this method is equivalent * to invoking {@link #loadClass(String, boolean) <tt>loadClass(name, ! * false)</tt>}. </p> * * @param name * The <a href="#name">binary name</a> of the class * * @return The resulting <tt>Class</tt> object --- 340,350 ---- * Loads the class with the specified <a href="#name">binary name</a>. * This method searches for classes in the same manner as the {@link * #loadClass(String, boolean)} method. It is invoked by the Java virtual * machine to resolve class references. Invoking this method is equivalent * to invoking {@link #loadClass(String, boolean) <tt>loadClass(name, ! * false)</tt>}. * * @param name * The <a href="#name">binary name</a> of the class * * @return The resulting <tt>Class</tt> object
*** 439,449 **** * Returns the lock object for class loading operations. * For backward compatibility, the default implementation of this method * behaves as follows. If this ClassLoader object is registered as * parallel capable, the method returns a dedicated object associated * with the specified class name. Otherwise, the method returns this ! * ClassLoader object. </p> * * @param className * The name of the to-be-loaded class * * @return the lock for class loading operations --- 439,449 ---- * Returns the lock object for class loading operations. * For backward compatibility, the default implementation of this method * behaves as follows. If this ClassLoader object is registered as * parallel capable, the method returns a dedicated object associated * with the specified class name. Otherwise, the method returns this ! * ClassLoader object. * * @param className * The name of the to-be-loaded class * * @return the lock for class loading operations
*** 504,514 **** * Finds the class with the specified <a href="#name">binary name</a>. * This method should be overridden by class loader implementations that * follow the delegation model for loading classes, and will be invoked by * the {@link #loadClass <tt>loadClass</tt>} method after checking the * parent class loader for the requested class. The default implementation ! * throws a <tt>ClassNotFoundException</tt>. </p> * * @param name * The <a href="#name">binary name</a> of the class * * @return The resulting <tt>Class</tt> object --- 504,514 ---- * Finds the class with the specified <a href="#name">binary name</a>. * This method should be overridden by class loader implementations that * follow the delegation model for loading classes, and will be invoked by * the {@link #loadClass <tt>loadClass</tt>} method after checking the * parent class loader for the requested class. The default implementation ! * throws a <tt>ClassNotFoundException</tt>. * * @param name * The <a href="#name">binary name</a> of the class * * @return The resulting <tt>Class</tt> object
*** 770,789 **** * <p> An invocation of this method of the form * <i>cl</i><tt>.defineClass(</tt><i>name</i><tt>,</tt> * <i>bBuffer</i><tt>,</tt> <i>pd</i><tt>)</tt> yields exactly the same * result as the statements * ! * <blockquote><tt> * ...<br> ! * byte[] temp = new byte[</tt><i>bBuffer</i><tt>.{@link * java.nio.ByteBuffer#remaining remaining}()];<br> ! * </tt><i>bBuffer</i><tt>.{@link java.nio.ByteBuffer#get(byte[]) * get}(temp);<br> * return {@link #defineClass(String, byte[], int, int, ProtectionDomain) ! * </tt><i>cl</i><tt>.defineClass}(</tt><i>name</i><tt>, temp, 0, ! * temp.length, </tt><i>pd</i><tt>);<br> ! * </tt></blockquote> * * @param name * The expected <a href="#name">binary name</a>. of the class, or * <tt>null</tt> if not known * --- 770,789 ---- * <p> An invocation of this method of the form * <i>cl</i><tt>.defineClass(</tt><i>name</i><tt>,</tt> * <i>bBuffer</i><tt>,</tt> <i>pd</i><tt>)</tt> yields exactly the same * result as the statements * ! *<p> <tt> * ...<br> ! * byte[] temp = new byte[bBuffer.{@link * java.nio.ByteBuffer#remaining remaining}()];<br> ! * bBuffer.{@link java.nio.ByteBuffer#get(byte[]) * get}(temp);<br> * return {@link #defineClass(String, byte[], int, int, ProtectionDomain) ! * cl.defineClass}(name, temp, 0, ! * temp.length, pd);<br> ! * </tt></p> * * @param name * The expected <a href="#name">binary name</a>. of the class, or * <tt>null</tt> if not known *
*** 938,948 **** * Links the specified class. This (misleadingly named) method may be * used by a class loader to link a class. If the class <tt>c</tt> has * already been linked, then this method simply returns. Otherwise, the * class is linked as described in the "Execution" chapter of * <cite>The Java&trade; Language Specification</cite>. - * </p> * * @param c * The class to link * * @throws NullPointerException --- 938,947 ----
*** 1010,1020 **** /** * Returns the class with the given <a href="#name">binary name</a> if this * loader has been recorded by the Java virtual machine as an initiating * loader of a class with that <a href="#name">binary name</a>. Otherwise ! * <tt>null</tt> is returned. </p> * * @param name * The <a href="#name">binary name</a> of the class * * @return The <tt>Class</tt> object, or <tt>null</tt> if the class has --- 1009,1019 ---- /** * Returns the class with the given <a href="#name">binary name</a> if this * loader has been recorded by the Java virtual machine as an initiating * loader of a class with that <a href="#name">binary name</a>. Otherwise ! * <tt>null</tt> is returned. * * @param name * The <a href="#name">binary name</a> of the class * * @return The <tt>Class</tt> object, or <tt>null</tt> if the class has
*** 1030,1040 **** private native final Class<?> findLoadedClass0(String name); /** * Sets the signers of a class. This should be invoked after defining a ! * class. </p> * * @param c * The <tt>Class</tt> object * * @param signers --- 1029,1039 ---- private native final Class<?> findLoadedClass0(String name); /** * Sets the signers of a class. This should be invoked after defining a ! * class. * * @param c * The <tt>Class</tt> object * * @param signers
*** 1123,1133 **** return new CompoundEnumeration<>(tmp); } /** * Finds the resource with the given name. Class loader implementations ! * should override this method to specify where to find resources. </p> * * @param name * The resource name * * @return A <tt>URL</tt> object for reading the resource, or --- 1122,1132 ---- return new CompoundEnumeration<>(tmp); } /** * Finds the resource with the given name. Class loader implementations ! * should override this method to specify where to find resources. * * @param name * The resource name * * @return A <tt>URL</tt> object for reading the resource, or
*** 1141,1151 **** /** * Returns an enumeration of {@link java.net.URL <tt>URL</tt>} objects * representing all the resources with the given name. Class loader * implementations should override this method to specify where to load ! * resources from. </p> * * @param name * The resource name * * @return An enumeration of {@link java.net.URL <tt>URL</tt>} objects for --- 1140,1150 ---- /** * Returns an enumeration of {@link java.net.URL <tt>URL</tt>} objects * representing all the resources with the given name. Class loader * implementations should override this method to specify where to load ! * resources from. * * @param name * The resource name * * @return An enumeration of {@link java.net.URL <tt>URL</tt>} objects for
*** 1159,1176 **** protected Enumeration<URL> findResources(String name) throws IOException { return java.util.Collections.emptyEnumeration(); } /** ! * Registers the caller as parallel capable.</p> * The registration succeeds if and only if all of the following ! * conditions are met: <br> ! * 1. no instance of the caller has been created</p> ! * 2. all of the super classes (except class Object) of the caller are ! * registered as parallel capable</p> ! * Note that once a class loader is registered as parallel capable, there ! * is no way to change it back. </p> * * @return true if the caller is successfully registered as * parallel capable and false if otherwise. * * @since 1.7 --- 1158,1177 ---- protected Enumeration<URL> findResources(String name) throws IOException { return java.util.Collections.emptyEnumeration(); } /** ! * Registers the caller as parallel capable. * The registration succeeds if and only if all of the following ! * conditions are met: ! * <ol> ! * <li> no instance of the caller has been created</li> ! * <li> all of the super classes (except class Object) of the caller are ! * registered as parallel capable</li> ! * </ol> ! * <p>Note that once a class loader is registered as parallel capable, there ! * is no way to change it back.</p> * * @return true if the caller is successfully registered as * parallel capable and false if otherwise. * * @since 1.7
*** 1183,1193 **** } /** * Find a resource of the specified name from the search path used to load * classes. This method locates the resource through the system class ! * loader (see {@link #getSystemClassLoader()}). </p> * * @param name * The resource name * * @return A {@link java.net.URL <tt>URL</tt>} object for reading the --- 1184,1194 ---- } /** * Find a resource of the specified name from the search path used to load * classes. This method locates the resource through the system class ! * loader (see {@link #getSystemClassLoader()}). * * @param name * The resource name * * @return A {@link java.net.URL <tt>URL</tt>} object for reading the
*** 1290,1300 **** } /** * Open for reading, a resource of the specified name from the search path * used to load classes. This method locates the resource through the ! * system class loader (see {@link #getSystemClassLoader()}). </p> * * @param name * The resource name * * @return An input stream for reading the resource, or <tt>null</tt> --- 1291,1301 ---- } /** * Open for reading, a resource of the specified name from the search path * used to load classes. This method locates the resource through the ! * system class loader (see {@link #getSystemClassLoader()}). * * @param name * The resource name * * @return An input stream for reading the resource, or <tt>null</tt>
*** 1513,1523 **** /** * Defines a package by name in this <tt>ClassLoader</tt>. This allows * class loaders to define the packages for their classes. Packages must * be created before the class is defined, and package names must be * unique within a class loader and cannot be redefined or changed once ! * created. </p> * * @param name * The package name * * @param specTitle --- 1514,1524 ---- /** * Defines a package by name in this <tt>ClassLoader</tt>. This allows * class loaders to define the packages for their classes. Packages must * be created before the class is defined, and package names must be * unique within a class loader and cannot be redefined or changed once ! * created. * * @param name * The package name * * @param specTitle
*** 1570,1580 **** } } /** * Returns a <tt>Package</tt> that has been defined by this class loader ! * or any of its ancestors. </p> * * @param name * The package name * * @return The <tt>Package</tt> corresponding to the given name, or --- 1571,1581 ---- } } /** * Returns a <tt>Package</tt> that has been defined by this class loader ! * or any of its ancestors. * * @param name * The package name * * @return The <tt>Package</tt> corresponding to the given name, or
*** 1607,1617 **** return pkg; } /** * Returns all of the <tt>Packages</tt> defined by this class loader and ! * its ancestors. </p> * * @return The array of <tt>Package</tt> objects defined by this * <tt>ClassLoader</tt> * * @since 1.2 --- 1608,1618 ---- return pkg; } /** * Returns all of the <tt>Packages</tt> defined by this class loader and ! * its ancestors. * * @return The array of <tt>Package</tt> objects defined by this * <tt>ClassLoader</tt> * * @since 1.2
*** 1644,1654 **** /** * Returns the absolute path name of a native library. The VM invokes this * method to locate the native libraries that belong to classes loaded with * this class loader. If this method returns <tt>null</tt>, the VM * searches the library along the path specified as the ! * "<tt>java.library.path</tt>" property. </p> * * @param libname * The library name * * @return The absolute path of the native library --- 1645,1655 ---- /** * Returns the absolute path name of a native library. The VM invokes this * method to locate the native libraries that belong to classes loaded with * this class loader. If this method returns <tt>null</tt>, the VM * searches the library along the path specified as the ! * "<tt>java.library.path</tt>" property. * * @param libname * The library name * * @return The absolute path of the native library
*** 1964,1974 **** * Sets the default assertion status for this class loader. This setting * determines whether classes loaded by this class loader and initialized * in the future will have assertions enabled or disabled by default. * This setting may be overridden on a per-package or per-class basis by * invoking {@link #setPackageAssertionStatus(String, boolean)} or {@link ! * #setClassAssertionStatus(String, boolean)}. </p> * * @param enabled * <tt>true</tt> if classes loaded by this class loader will * henceforth have assertions enabled by default, <tt>false</tt> * if they will have assertions disabled by default. --- 1965,1975 ---- * Sets the default assertion status for this class loader. This setting * determines whether classes loaded by this class loader and initialized * in the future will have assertions enabled or disabled by default. * This setting may be overridden on a per-package or per-class basis by * invoking {@link #setPackageAssertionStatus(String, boolean)} or {@link ! * #setClassAssertionStatus(String, boolean)}. * * @param enabled * <tt>true</tt> if classes loaded by this class loader will * henceforth have assertions enabled by default, <tt>false</tt> * if they will have assertions disabled by default.
*** 2066,2076 **** * Sets the default assertion status for this class loader to * <tt>false</tt> and discards any package defaults or class assertion * status settings associated with the class loader. This method is * provided so that class loaders can be made to ignore any command line or * persistent assertion status settings and "start with a clean slate." - * </p> * * @since 1.4 */ public void clearAssertionStatus() { /* --- 2067,2076 ----