src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java

Print this page




  47 public final class DataPropertyDescriptor extends ScriptObject implements PropertyDescriptor {
  48     /** is this property configurable */
  49     @Property
  50     public Object configurable;
  51 
  52     /** is this property enumerable */
  53     @Property
  54     public Object enumerable;
  55 
  56     /** is this property writable */
  57     @Property
  58     public Object writable;
  59 
  60     /** value of this property */
  61     @Property
  62     public Object value;
  63 
  64     // initialized by nasgen
  65     private static PropertyMap $nasgenmap$;
  66 
  67     static PropertyMap getInitialMap() {
  68         return $nasgenmap$;
  69     }
  70 
  71     DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value, final Global global) {
  72         super(global.getObjectPrototype(), getInitialMap());
  73         this.configurable = configurable;
  74         this.enumerable   = enumerable;
  75         this.writable     = writable;
  76         this.value        = value;
  77     }
  78 
  79 
  80     @Override
  81     public boolean isConfigurable() {
  82         return JSType.toBoolean(configurable);
  83     }
  84 
  85     @Override
  86     public boolean isEnumerable() {
  87         return JSType.toBoolean(enumerable);
  88     }
  89 
  90     @Override
  91     public boolean isWritable() {
  92         return JSType.toBoolean(writable);




  47 public final class DataPropertyDescriptor extends ScriptObject implements PropertyDescriptor {
  48     /** is this property configurable */
  49     @Property
  50     public Object configurable;
  51 
  52     /** is this property enumerable */
  53     @Property
  54     public Object enumerable;
  55 
  56     /** is this property writable */
  57     @Property
  58     public Object writable;
  59 
  60     /** value of this property */
  61     @Property
  62     public Object value;
  63 
  64     // initialized by nasgen
  65     private static PropertyMap $nasgenmap$;
  66 




  67     DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value, final Global global) {
  68         super(global.getObjectPrototype(), $nasgenmap$);
  69         this.configurable = configurable;
  70         this.enumerable   = enumerable;
  71         this.writable     = writable;
  72         this.value        = value;
  73     }
  74 
  75 
  76     @Override
  77     public boolean isConfigurable() {
  78         return JSType.toBoolean(configurable);
  79     }
  80 
  81     @Override
  82     public boolean isEnumerable() {
  83         return JSType.toBoolean(enumerable);
  84     }
  85 
  86     @Override
  87     public boolean isWritable() {
  88         return JSType.toBoolean(writable);