< prev index next >
src/java.base/share/classes/java/lang/Class.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -319,14 +319,14 @@
* {@code X} to be initialized.
*
* @param className the fully qualified name of the desired class.
* @return the {@code Class} object for the class with the
* specified name.
- * @exception LinkageError if the linkage fails
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws LinkageError if the linkage fails
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails
- * @exception ClassNotFoundException if the class cannot be located
+ * @throws ClassNotFoundException if the class cannot be located
*/
@CallerSensitive
public static Class<?> forName(String className)
throws ClassNotFoundException {
Class<?> caller = Reflection.getCallerClass();
@@ -377,16 +377,16 @@
* @param initialize if {@code true} the class will be initialized.
* See Section 12.4 of <em>The Java Language Specification</em>.
* @param loader class loader from which the class must be loaded
* @return class object representing the desired class
*
- * @exception LinkageError if the linkage fails
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws LinkageError if the linkage fails
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails
- * @exception ClassNotFoundException if the class cannot be located by
+ * @throws ClassNotFoundException if the class cannot be located by
* the specified class loader
- * @exception SecurityException
+ * @throws SecurityException
* if a security manager is present, and the {@code loader} is
* {@code null}, and the caller's class loader is not
* {@code null}, and the caller does not have the
* {@link RuntimePermission}{@code ("getClassLoader")}
*
@@ -668,11 +668,11 @@
* Specification</em>, sections 5.1.1 and 5.1.4 , for details.
*
* @param cls the {@code Class} object to be checked
* @return the {@code boolean} value indicating whether objects of the
* type {@code cls} can be assigned to objects of this class
- * @exception NullPointerException if the specified Class parameter is
+ * @throws NullPointerException if the specified Class parameter is
* null.
* @since 1.1
*/
@HotSpotIntrinsicCandidate
public native boolean isAssignableFrom(Class<?> cls);
@@ -1510,11 +1510,11 @@
/**
* Returns the immediately enclosing class of the underlying
* class. If the underlying class is a top level class this
* method returns {@code null}.
* @return the immediately enclosing class of the underlying class
- * @exception SecurityException
+ * @throws SecurityException
* If a security manager, <i>s</i>, is present and the caller's
* class loader is not the same as or an ancestor of the class
* loader for the enclosing class and invocation of {@link
* SecurityManager#checkPackageAccess s.checkPackageAccess()}
* denies access to the package of the enclosing class
< prev index next >