本文整理了Java中org.mozilla.javascript.NativeArray.isSealed()
方法的一些代码示例,展示了NativeArray.isSealed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NativeArray.isSealed()
方法的具体详情如下:
包路径:org.mozilla.javascript.NativeArray
类名称:NativeArray
方法名:isSealed
暂无
代码示例来源:origin: com.sun.phobos/phobos-rhino
public void delete(int index)
{
if (!isSealed()
&& dense != null && 0 <= index && index < dense.length)
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
public void put(int index, Scriptable start, Object value)
{
if (start == this && !isSealed()
&& dense != null && 0 <= index && index < dense.length)
{
// If start == this && sealed, super will throw exception
dense[index] = value;
} else {
super.put(index, start, value);
}
if (start == this) {
// only set the array length if given an array index (ECMA 15.4.0)
if (this.length <= index) {
// avoid overflowing index!
this.length = (long)index + 1;
}
}
}
代码示例来源:origin: com.github.tntim96/rhino
@Override
public void delete(int index)
{
if (dense != null && 0 <= index && index < dense.length &&
!isSealed() && (denseOnly || !isGetterOrSetter(null, index, true)))
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: geogebra/geogebra
@Override
public void delete(int index)
{
if (dense != null && 0 <= index && index < dense.length &&
!isSealed() && (denseOnly || !isGetterOrSetter(null, index, true)))
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: rhino/js
@Override
public void delete(int index)
{
if (dense != null && 0 <= index && index < dense.length &&
!isSealed() && (denseOnly || !isGetterOrSetter(null, index, true)))
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
@Override
public void delete(int index)
{
if (dense != null && 0 <= index && index < dense.length &&
!isSealed() && (denseOnly || !isGetterOrSetter(null, index, true)))
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: io.apigee/rhino
@Override
public void delete(int index)
{
if (dense != null && 0 <= index && index < dense.length &&
!isSealed() && (denseOnly || !isGetterOrSetter(null, index, true)))
{
dense[index] = NOT_FOUND;
} else {
super.delete(index);
}
}
代码示例来源:origin: rhino/js
@Override
public void put(int index, Scriptable start, Object value)
{
if (start == this && !isSealed() && dense != null && 0 <= index &&
(denseOnly || !isGetterOrSetter(null, index, true)))
{
if (index < dense.length) {
dense[index] = value;
if (this.length <= index)
this.length = (long)index + 1;
return;
} else if (denseOnly && index < dense.length * GROW_FACTOR &&
ensureCapacity(index+1))
{
dense[index] = value;
this.length = (long)index + 1;
return;
} else {
denseOnly = false;
}
}
super.put(index, start, value);
if (start == this) {
// only set the array length if given an array index (ECMA 15.4.0)
if (this.length <= index) {
// avoid overflowing index!
this.length = (long)index + 1;
}
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
@Override
public void put(int index, Scriptable start, Object value)
{
if (start == this && !isSealed() && dense != null && 0 <= index &&
(denseOnly || !isGetterOrSetter(null, index, true)))
{
if (index < dense.length) {
dense[index] = value;
if (this.length <= index)
this.length = (long)index + 1;
return;
} else if (denseOnly && index < dense.length * GROW_FACTOR &&
ensureCapacity(index+1))
{
dense[index] = value;
this.length = (long)index + 1;
return;
} else {
denseOnly = false;
}
}
super.put(index, start, value);
if (start == this && (lengthAttr & READONLY) == 0) {
// only set the array length if given an array index (ECMA 15.4.0)
if (this.length <= index) {
// avoid overflowing index!
this.length = (long)index + 1;
}
}
}
代码示例来源:origin: com.github.tntim96/rhino
@Override
public void put(int index, Scriptable start, Object value)
{
if (start == this && !isSealed() && dense != null && 0 <= index &&
(denseOnly || !isGetterOrSetter(null, index, true)))
{
if (index < dense.length) {
dense[index] = value;
if (this.length <= index)
this.length = (long)index + 1;
return;
} else if (denseOnly && index < dense.length * GROW_FACTOR &&
ensureCapacity(index+1))
{
dense[index] = value;
this.length = (long)index + 1;
return;
} else {
denseOnly = false;
}
}
super.put(index, start, value);
if (start == this && (lengthAttr & READONLY) == 0) {
// only set the array length if given an array index (ECMA 15.4.0)
if (this.length <= index) {
// avoid overflowing index!
this.length = (long)index + 1;
}
}
}
代码示例来源:origin: geogebra/geogebra
@Override
public void put(int index, Scriptable start, Object value)
if (start == this && !isSealed() && dense != null && 0 <= index &&
(denseOnly || !isGetterOrSetter(null, index, true)))
代码示例来源:origin: io.apigee/rhino
@Override
public void put(int index, Scriptable start, Object value)
if (start == this && !isSealed() && dense != null && 0 <= index &&
(denseOnly || !isGetterOrSetter(null, index, true)))
内容来源于网络,如有侵权,请联系作者删除!