< prev index next >

test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java

Print this page

40     @IntrinsicCandidate
41     public native int hashCode();
42 
43     public boolean equals(Object obj) {
44         return (this == obj);
45     }
46 
47     @IntrinsicCandidate
48     protected native Object clone() throws CloneNotSupportedException;
49 
50     public String toString() {
51         return getClass().getName() + "@" + Integer.toHexString(hashCode());
52     }
53 
54     @IntrinsicCandidate
55     public final native void notify();
56 
57     @IntrinsicCandidate
58     public final native void notifyAll();
59 
60     public final native void wait(long timeout) throws InterruptedException;




61 
62     public final void wait(long timeout, int nanos) throws InterruptedException {
63         if (timeout < 0) {
64             throw new IllegalArgumentException("timeout value is negative");
65         }
66 
67         if (nanos < 0 || nanos > 999999) {
68             throw new IllegalArgumentException(
69                                 "nanosecond timeout value out of range");
70         }
71 
72         if (nanos >= 500000 || (nanos != 0 && timeout == 0)) {
73             timeout++;
74         }
75 
76         wait(timeout);
77     }
78 
79     public final void wait() throws InterruptedException {
80         wait(0);
81     }
82 
83     /**
84      * Replaces original finalize() method and is therefore not
85      * overridden by any subclasses of Object.
86      * @throws Throwable
87      */
88     // protected void finalize() throws Throwable { }
89     public void finalizeObject() throws Throwable { }
90 }

40     @IntrinsicCandidate
41     public native int hashCode();
42 
43     public boolean equals(Object obj) {
44         return (this == obj);
45     }
46 
47     @IntrinsicCandidate
48     protected native Object clone() throws CloneNotSupportedException;
49 
50     public String toString() {
51         return getClass().getName() + "@" + Integer.toHexString(hashCode());
52     }
53 
54     @IntrinsicCandidate
55     public final native void notify();
56 
57     @IntrinsicCandidate
58     public final native void notifyAll();
59 
60     private final native void wait0(long timeout) throws InterruptedException;
61 
62     public final void wait(long timeout) throws InterruptedException {
63         wait0(timeout);
64     }
65 
66     public final void wait(long timeout, int nanos) throws InterruptedException {
67         if (timeout < 0) {
68             throw new IllegalArgumentException("timeout value is negative");
69         }
70 
71         if (nanos < 0 || nanos > 999999) {
72             throw new IllegalArgumentException(
73                                 "nanosecond timeout value out of range");
74         }
75 
76         if (nanos >= 500000 || (nanos != 0 && timeout == 0)) {
77             timeout++;
78         }
79 
80         wait0(timeout);
81     }
82 
83     public final void wait() throws InterruptedException {
84         wait0(0);
85     }
86 
87     /**
88      * Replaces original finalize() method and is therefore not
89      * overridden by any subclasses of Object.
90      * @throws Throwable
91      */
92     // protected void finalize() throws Throwable { }
93     public void finalizeObject() throws Throwable { }
94 }
< prev index next >