object.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 66 行

JAVA
66
字号
/*
 *  java.lang.Object
 *
 *  (c) 1997 George David Morrison
 *
 *  API version: 1.0.2
 *
 *  History:
 *  01FEB1997  George David Morrison
 *    Initial version
 */

package java.lang;

import org.jnode.vm.MonitorManager;
import org.jnode.vm.VmSystem;

public class Object {
	
	public final Class getClass() {
		return VmSystem.getClass(this);
	}

	public final void notify() throws IllegalMonitorStateException {
		MonitorManager.notify(this);
	}

	public final void notifyAll() throws IllegalMonitorStateException {
		MonitorManager.notifyAll(this);
	}

	public final void wait(long millis, int nanos) throws IllegalMonitorStateException, InterruptedException {
		MonitorManager.wait(this, millis);
	}

	public int hashCode() {
		return VmSystem.getHashCode(this);
	}

	protected Object clone() throws CloneNotSupportedException {
		return VmSystem.clone(this);
	}

	public String toString() {
		return getClass().getName() + '@' + Integer.toHexString(hashCode());
	}

	public boolean equals(Object obj) {
		return (this == obj);
	}

	public final void wait(long millis) throws IllegalMonitorStateException, InterruptedException {
		wait(millis, 0);
	}

	public final void wait() throws IllegalMonitorStateException, InterruptedException {
		wait(0, 0); 
	}

	protected void finalize() throws Throwable {
	}

	public Object() {
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?