< prev index next >

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

Print this page




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




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


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