src/share/classes/java/lang/Object.java
Print this page
@@ -56,12 +56,11 @@
* {@code Class<? extends Number> c = n.getClass(); }
* </p>
*
* @return The {@code Class} object that represents the runtime
* class of this object.
- * @see Class Literals, section 15.8.2 of
- * <cite>The Java™ Language Specification</cite>.
+ * @jls 15.8.2 Class Literals
*/
public final native Class<?> getClass();
/**
* Returns a hash code value for the object. This method is
@@ -90,11 +89,11 @@
* As much as is reasonably practical, the hashCode method defined by
* class {@code Object} does return distinct integers for distinct
* objects. (This is typically implemented by converting the internal
* address of the object into an integer, but this implementation
* technique is not required by the
- * Java<font size="-2"><sup>TM</sup></font> programming language.)
+ * Java™ programming language.)
*
* @return a hash code value for this object.
* @see java.lang.Object#equals(java.lang.Object)
* @see java.lang.System#identityHashCode
*/
@@ -201,11 +200,11 @@
* {@code Cloneable}, so calling the {@code clone} method on an object
* whose class is {@code Object} will result in throwing an
* exception at run time.
*
* @return a clone of this instance.
- * @exception CloneNotSupportedException if the object's class does not
+ * @throws CloneNotSupportedException if the object's class does not
* support the {@code Cloneable} interface. Subclasses
* that override the {@code clone} method can also
* throw this exception to indicate that an instance cannot
* be cloned.
* @see java.lang.Cloneable
@@ -262,11 +261,11 @@
* synchronized static method of that class.
* </ul>
* <p>
* Only one thread at a time can own an object's monitor.
*
- * @exception IllegalMonitorStateException if the current thread is not
+ * @throws IllegalMonitorStateException if the current thread is not
* the owner of this object's monitor.
* @see java.lang.Object#notifyAll()
* @see java.lang.Object#wait()
*/
public final native void notify();
@@ -286,11 +285,11 @@
* This method should only be called by a thread that is the owner
* of this object's monitor. See the {@code notify} method for a
* description of the ways in which a thread can become the owner of
* a monitor.
*
- * @exception IllegalMonitorStateException if the current thread is not
+ * @throws IllegalMonitorStateException if the current thread is not
* the owner of this object's monitor.
* @see java.lang.Object#notify()
* @see java.lang.Object#wait()
*/
public final native void notifyAll();
@@ -366,15 +365,15 @@
* of this object's monitor. See the {@code notify} method for a
* description of the ways in which a thread can become the owner of
* a monitor.
*
* @param timeout the maximum time to wait in milliseconds.
- * @exception IllegalArgumentException if the value of timeout is
+ * @throws IllegalArgumentException if the value of timeout is
* negative.
- * @exception IllegalMonitorStateException if the current thread is not
+ * @throws IllegalMonitorStateException if the current thread is not
* the owner of the object's monitor.
- * @exception InterruptedException if any thread interrupted the
+ * @throws InterruptedException if any thread interrupted the
* current thread before or while the current thread
* was waiting for a notification. The <i>interrupted
* status</i> of the current thread is cleared when
* this exception is thrown.
* @see java.lang.Object#notify()
@@ -431,16 +430,16 @@
* a monitor.
*
* @param timeout the maximum time to wait in milliseconds.
* @param nanos additional time, in nanoseconds range
* 0-999999.
- * @exception IllegalArgumentException if the value of timeout is
+ * @throws IllegalArgumentException if the value of timeout is
* negative or the value of nanos is
* not in the range 0-999999.
- * @exception IllegalMonitorStateException if the current thread is not
+ * @throws IllegalMonitorStateException if the current thread is not
* the owner of this object's monitor.
- * @exception InterruptedException if any thread interrupted the
+ * @throws InterruptedException if any thread interrupted the
* current thread before or while the current thread
* was waiting for a notification. The <i>interrupted
* status</i> of the current thread is cleared when
* this exception is thrown.
*/
@@ -487,13 +486,13 @@
* This method should only be called by a thread that is the owner
* of this object's monitor. See the {@code notify} method for a
* description of the ways in which a thread can become the owner of
* a monitor.
*
- * @exception IllegalMonitorStateException if the current thread is not
+ * @throws IllegalMonitorStateException if the current thread is not
* the owner of the object's monitor.
- * @exception InterruptedException if any thread interrupted the
+ * @throws InterruptedException if any thread interrupted the
* current thread before or while the current thread
* was waiting for a notification. The <i>interrupted
* status</i> of the current thread is cleared when
* this exception is thrown.
* @see java.lang.Object#notify()
@@ -508,11 +507,11 @@
* determines that there are no more references to the object.
* A subclass overrides the {@code finalize} method to dispose of
* system resources or to perform other cleanup.
* <p>
* The general contract of {@code finalize} is that it is invoked
- * if and when the Java<font size="-2"><sup>TM</sup></font> virtual
+ * if and when the Java™ virtual
* machine has determined that there is no longer any
* means by which this object can be accessed by any thread that has
* not yet died, except as a result of an action taken by the
* finalization of some other object or class which is ready to be
* finalized. The {@code finalize} method may take any action, including
@@ -547,8 +546,11 @@
* Any exception thrown by the {@code finalize} method causes
* the finalization of this object to be halted, but is otherwise
* ignored.
*
* @throws Throwable the {@code Exception} raised by this method
+ * @see java.lang.ref.WeakReference
+ * @see java.lang.ref.PhantomReference
+ * @jls 12.6 Finalization of Class Instances
*/
protected void finalize() throws Throwable { }
}