src/jdk/nashorn/internal/runtime/Property.java

changeset 1720
c09b105e7be5
parent 1510
5e3d8947e95c
child 1959
61ffdd1b89f2
equal deleted inserted replaced
1719:95b8a01d3b52 1720:c09b105e7be5
448 * 448 *
449 * @param self the this object 449 * @param self the this object
450 * @param owner the owner of the property 450 * @param owner the owner of the property
451 * @return the property value 451 * @return the property value
452 */ 452 */
453 public abstract long getLongValue(final ScriptObject self, final ScriptObject owner);
454
455 /**
456 * get the Object value of this property from {@code owner}. This allows to bypass creation of the
457 * getter MethodHandle for spill and user accessor properties.
458 *
459 * @param self the this object
460 * @param owner the owner of the property
461 * @return the property value
462 */
463 public abstract double getDoubleValue(final ScriptObject self, final ScriptObject owner); 453 public abstract double getDoubleValue(final ScriptObject self, final ScriptObject owner);
464 454
465 /** 455 /**
466 * get the Object value of this property from {@code owner}. This allows to bypass creation of the 456 * get the Object value of this property from {@code owner}. This allows to bypass creation of the
467 * getter MethodHandle for spill and user accessor properties. 457 * getter MethodHandle for spill and user accessor properties.
480 * @param owner the owner object 470 * @param owner the owner object
481 * @param value the new property value 471 * @param value the new property value
482 * @param strict is this a strict setter? 472 * @param strict is this a strict setter?
483 */ 473 */
484 public abstract void setValue(final ScriptObject self, final ScriptObject owner, final int value, final boolean strict); 474 public abstract void setValue(final ScriptObject self, final ScriptObject owner, final int value, final boolean strict);
485
486 /**
487 * Set the value of this property in {@code owner}. This allows to bypass creation of the
488 * setter MethodHandle for spill and user accessor properties.
489 *
490 * @param self the this object
491 * @param owner the owner object
492 * @param value the new property value
493 * @param strict is this a strict setter?
494 */
495 public abstract void setValue(final ScriptObject self, final ScriptObject owner, final long value, final boolean strict);
496 475
497 /** 476 /**
498 * Set the value of this property in {@code owner}. This allows to bypass creation of the 477 * Set the value of this property in {@code owner}. This allows to bypass creation of the
499 * setter MethodHandle for spill and user accessor properties. 478 * setter MethodHandle for spill and user accessor properties.
500 * 479 *
591 private static String type(final Class<?> type) { 570 private static String type(final Class<?> type) {
592 if (type == null) { 571 if (type == null) {
593 return "undef"; 572 return "undef";
594 } else if (type == int.class) { 573 } else if (type == int.class) {
595 return "i"; 574 return "i";
596 } else if (type == long.class) {
597 return "j";
598 } else if (type == double.class) { 575 } else if (type == double.class) {
599 return "d"; 576 return "d";
600 } else { 577 } else {
601 return "o"; 578 return "o";
602 } 579 }

mercurial