LC3 support: make Java arrays have Array.prototype as a prototype.

This commit is contained in:
norris%netscape.com 1999-06-03 23:38:47 +00:00
Родитель 31a7740439
Коммит 45e66dd4d3
2 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

@ -52,6 +52,21 @@ public class NativeJavaArray extends NativeJavaObject {
this.array = array;
this.length = Array.getLength(array);
this.cls = cl.getComponentType();
setPrototype(ScriptableObject.getClassPrototype(scope, "Array"));
}
/**
* Returns the prototype of the object.
*/
public Scriptable getPrototype() {
return prototype;
}
/**
* Sets the prototype of the object.
*/
public void setPrototype(Scriptable m) {
prototype = m;
}
public boolean has(String id, Scriptable start) {
@ -118,4 +133,5 @@ public class NativeJavaArray extends NativeJavaObject {
Object array;
int length;
Class cls;
Scriptable prototype;
}

Просмотреть файл

@ -52,6 +52,21 @@ public class NativeJavaArray extends NativeJavaObject {
this.array = array;
this.length = Array.getLength(array);
this.cls = cl.getComponentType();
setPrototype(ScriptableObject.getClassPrototype(scope, "Array"));
}
/**
* Returns the prototype of the object.
*/
public Scriptable getPrototype() {
return prototype;
}
/**
* Sets the prototype of the object.
*/
public void setPrototype(Scriptable m) {
prototype = m;
}
public boolean has(String id, Scriptable start) {
@ -118,4 +133,5 @@ public class NativeJavaArray extends NativeJavaObject {
Object array;
int length;
Class cls;
Scriptable prototype;
}