516 * 517 * @param src the source array. 518 * @param srcPos starting position in the source array. 519 * @param dest the destination array. 520 * @param destPos starting position in the destination data. 521 * @param length the number of array elements to be copied. 522 * @throws IndexOutOfBoundsException if copying would cause 523 * access of data outside array bounds. 524 * @throws ArrayStoreException if an element in the {@code src} 525 * array could not be stored into the {@code dest} array 526 * because of a type mismatch. 527 * @throws NullPointerException if either {@code src} or 528 * {@code dest} is {@code null}. 529 */ 530 @HotSpotIntrinsicCandidate 531 public static native void arraycopy(Object src, int srcPos, 532 Object dest, int destPos, 533 int length); 534 535 /** 536 * Returns the same hash code for the given object as 537 * would be returned by the default method hashCode(), 538 * whether or not the given object's class overrides 539 * hashCode(). 540 * The hash code for the null reference is zero. 541 * 542 * @param x object for which the hashCode is to be calculated 543 * @return the hashCode 544 * @since 1.1 545 * @see Object#hashCode 546 * @see java.util.Objects#hashCode(Object) 547 */ 548 @HotSpotIntrinsicCandidate 549 public static native int identityHashCode(Object x); 550 551 /** 552 * System properties. The following properties are guaranteed to be defined: 553 * <dl> 554 * <dt>java.version <dd>Java version number 555 * <dt>java.version.date <dd>Java version date | 516 * 517 * @param src the source array. 518 * @param srcPos starting position in the source array. 519 * @param dest the destination array. 520 * @param destPos starting position in the destination data. 521 * @param length the number of array elements to be copied. 522 * @throws IndexOutOfBoundsException if copying would cause 523 * access of data outside array bounds. 524 * @throws ArrayStoreException if an element in the {@code src} 525 * array could not be stored into the {@code dest} array 526 * because of a type mismatch. 527 * @throws NullPointerException if either {@code src} or 528 * {@code dest} is {@code null}. 529 */ 530 @HotSpotIntrinsicCandidate 531 public static native void arraycopy(Object src, int srcPos, 532 Object dest, int destPos, 533 int length); 534 535 /** 536 * Set bit atomically 537 * @param bits bits 538 * @param index index 539 */ 540 @HotSpotIntrinsicCandidate 541 public static void setBit(byte[] bits, int index) { 542 throw new UnsupportedOperationException(); 543 } 544 545 /** 546 * Clear bit atomically 547 * @param bits bits 548 * @param index index 549 */ 550 @HotSpotIntrinsicCandidate 551 public static void clrBit(byte[] bits, int index) { 552 throw new UnsupportedOperationException(); 553 } 554 555 /** 556 * Get bit 557 * @param bits bits 558 * @param index index 559 * @return value 560 */ 561 public static boolean isBit(byte[] bits, int index) { 562 return ((bits[index>>3] >> (index & 7)) & 1) == 1; 563 } 564 565 /** 566 * Returns the same hash code for the given object as 567 * would be returned by the default method hashCode(), 568 * whether or not the given object's class overrides 569 * hashCode(). 570 * The hash code for the null reference is zero. 571 * 572 * @param x object for which the hashCode is to be calculated 573 * @return the hashCode 574 * @since 1.1 575 * @see Object#hashCode 576 * @see java.util.Objects#hashCode(Object) 577 */ 578 @HotSpotIntrinsicCandidate 579 public static native int identityHashCode(Object x); 580 581 /** 582 * System properties. The following properties are guaranteed to be defined: 583 * <dl> 584 * <dt>java.version <dd>Java version number 585 * <dt>java.version.date <dd>Java version date |