nashorn/src/jdk/nashorn/internal/objects/NativeInt16Array.java
changeset 17763 f30b7aa0e736
parent 16226 0e4f37e6cc40
child 17771 9fedae4933e4
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeInt16Array.java	Wed May 22 16:39:48 2013 +0530
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeInt16Array.java	Wed May 22 19:33:08 2013 +0530
@@ -28,7 +28,9 @@
 import jdk.nashorn.internal.objects.annotations.Attribute;
 import jdk.nashorn.internal.objects.annotations.Constructor;
 import jdk.nashorn.internal.objects.annotations.Function;
+import jdk.nashorn.internal.objects.annotations.Property;
 import jdk.nashorn.internal.objects.annotations.ScriptClass;
+import jdk.nashorn.internal.objects.annotations.Where;
 import jdk.nashorn.internal.runtime.ScriptObject;
 import jdk.nashorn.internal.runtime.arrays.ArrayData;
 
@@ -37,7 +39,9 @@
  */
 @ScriptClass("Int16Array")
 public final class NativeInt16Array extends ArrayBufferView {
-    private static final int BYTES_PER_ELEMENT = 2;
+    @Property(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_WRITABLE | Attribute.NOT_CONFIGURABLE, where = Where.CONSTRUCTOR)
+    public static final int BYTES_PER_ELEMENT = 2;
+
     private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
         @Override
         public ArrayBufferView construct(final NativeArrayBuffer buffer, final int byteOffset, final int length) {