final void checkNotReadonly() { if ((attributes & READONLY) != 0) { String str = (name != null ? name : Integer.toString(indexOrHash)); throw Context.reportRuntimeError1("msg.modify.readonly", str); } }
@Override public void put(String id, Scriptable start, Object value) { // Ignore assignments to "length"--it's readonly. if (!id.equals("length")) throw Context.reportRuntimeError1( "msg.java.array.member.not.found", id); }
@Override public void put(String id, Scriptable start, Object value) { // Ignore assignments to "length"--it's readonly. if (!id.equals("length")) throw Context.reportRuntimeError1( "msg.java.array.member.not.found", id); }
@Override public void put(String id, Scriptable start, Object value) { // Ignore assignments to "length"--it's readonly. if (!id.equals("length")) throw Context.reportRuntimeError1( "msg.java.array.member.not.found", id); }
private void checkNotSealed(String name, int index) { if (!isSealed()) return; String str = (name != null) ? name : Integer.toString(index); throw Context.reportRuntimeError1("msg.modify.sealed", str); }
private Slot findAttributeSlot(String name, int index, int accessType) { Slot slot = getSlot(name, index, accessType); if (slot == null) { String str = (name != null ? name : Integer.toString(index)); throw Context.reportRuntimeError1("msg.prop.not.found", str); } return slot; }
private void checkNotSealed(String name, int index) { if (!isSealed()) return; String str = (name != null) ? name : Integer.toString(index); throw Context.reportRuntimeError1("msg.modify.sealed", str); }
private Slot findAttributeSlot(String name, int index, int accessType) { Slot slot = getSlot(name, index, accessType); if (slot == null) { String str = (name != null ? name : Integer.toString(index)); throw Context.reportRuntimeError1("msg.prop.not.found", str); } return slot; }
private void importClass(NativeJavaClass cl) { String s = cl.getClassObject().getName(); String n = s.substring(s.lastIndexOf('.')+1); Object val = get(n, this); if (val != NOT_FOUND && val != cl) { throw Context.reportRuntimeError1("msg.prop.defined", n); } //defineProperty(n, cl, DONTENUM); put(n, this, cl); }
private void importClass(NativeJavaClass cl) { String s = cl.getClassObject().getName(); String n = s.substring(s.lastIndexOf('.')+1); Object val = get(n, this); if (val != NOT_FOUND && val != cl) { throw Context.reportRuntimeError1("msg.prop.defined", n); } //defineProperty(n, cl, DONTENUM); put(n, this, cl); }
private void importClass(NativeJavaClass cl) { String s = cl.getClassObject().getName(); String n = s.substring(s.lastIndexOf('.')+1); Object val = get(n, this); if (val != NOT_FOUND && val != cl) { throw Context.reportRuntimeError1("msg.prop.defined", n); } //defineProperty(n, cl, DONTENUM); put(n, this, cl); }
private Object js_importClass(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaClass)) { throw Context.reportRuntimeError1( "msg.not.class", Context.toString(arg)); } importClass((NativeJavaClass)arg); } return Undefined.instance; }
private Object js_importPackage(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaPackage)) { throw Context.reportRuntimeError1( "msg.not.pkg", Context.toString(arg)); } importPackage((NativeJavaPackage)arg); } return Undefined.instance; }
private Object js_importPackage(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaPackage)) { throw Context.reportRuntimeError1( "msg.not.pkg", Context.toString(arg)); } importPackage((NativeJavaPackage)arg); } return Undefined.instance; }
private Object js_importClass(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaClass)) { throw Context.reportRuntimeError1( "msg.not.class", Context.toString(arg)); } importClass((NativeJavaClass)arg); } return Undefined.instance; }
private Object js_importClass(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaClass)) { throw Context.reportRuntimeError1( "msg.not.class", Context.toString(arg)); } importClass((NativeJavaClass)arg); } return Undefined.instance; }
private Object js_importClass(Object[] args) { for (int i = 0; i != args.length; i++) { Object arg = args[i]; if (!(arg instanceof NativeJavaClass)) { throw Context.reportRuntimeError1( "msg.not.class", Context.toString(arg)); } importClass((NativeJavaClass)arg); } return Undefined.instance; }
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { if (f.hasTag(FTAG)) { if (f.methodId() == Id_constructor) { throw Context.reportRuntimeError1("msg.cant.call.indirect", "With"); } } throw f.unknown(); }
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { if (f.hasTag(FTAG)) { if (f.methodId() == Id_constructor) { throw Context.reportRuntimeError1("msg.cant.call.indirect", "With"); } } throw f.unknown(); }
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { if (f.hasTag(FTAG)) { if (f.methodId() == Id_constructor) { throw Context.reportRuntimeError1("msg.cant.call.indirect", "With"); } } throw f.unknown(); }