public void put(int index, Scriptable start, Object value) { // TODO Clarify the following comment and add a reference to the spec // The comment: Spec says assignment to indexed XML object should return type error throw ScriptRuntime.typeError("Assignment to indexed XML is not allowed"); }
@Override public void put(int index, Scriptable start, Object value) { // TODO Clarify the following comment and add a reference to the spec // The comment: Spec says assignment to indexed XML object should return type error throw ScriptRuntime.typeError("Assignment to indexed XML is not allowed"); }
public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); return typeError(msg); }
public static EcmaError typeError2(String messageId, String arg1, String arg2) { String msg = getMessage2(messageId, arg1, arg2); return typeError(msg); }
public static EcmaError typeError0(String messageId) { String msg = getMessage0(messageId); return typeError(msg); }
public static EcmaError typeError1(String messageId, String arg1) { String msg = getMessage1(messageId, arg1); return typeError(msg); }
public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); return typeError(msg); }
public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); return typeError(msg); }
public static EcmaError typeError1(String messageId, String arg1) { String msg = getMessage1(messageId, arg1); return typeError(msg); }
public static EcmaError typeError2(String messageId, String arg1, String arg2) { String msg = getMessage2(messageId, arg1, arg2); return typeError(msg); }
public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); return typeError(msg); }
public static EcmaError typeError1(String messageId, String arg1) { String msg = getMessage1(messageId, arg1); return typeError(msg); }
public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); return typeError(msg); }
public static EcmaError typeError0(String messageId) { String msg = getMessage0(messageId); return typeError(msg); }
public static EcmaError typeError2(String messageId, String arg1, String arg2) { String msg = getMessage2(messageId, arg1, arg2); return typeError(msg); }
public static EcmaError typeError2(String messageId, String arg1, String arg2) { String msg = getMessage2(messageId, arg1, arg2); return typeError(msg); }
/** * Set the element at the specified index. */ public void put(int index, Object value) { try { putElement(index, value); } catch (ClassCastException cce) { throw ScriptRuntime.typeError("Invalid object type for external array"); } }
/** @deprecated I would love to encapsulate this somehow. */ XML makeXmlFromString(XMLName name, String value) { try { return newTextElementXML(this.node, name.toQname(), value.toString()); } catch(Exception e) { throw ScriptRuntime.typeError(e.getMessage()); } }
void setAttribute(XMLName xmlName, Object value) { if (!isElement()) throw new IllegalStateException("Can only set attributes on elements."); // TODO Is this legal, but just not "supported"? If so, support it. if (xmlName.uri() == null && xmlName.localName().equals("*")) { throw ScriptRuntime.typeError("@* assignment not supported."); } this.node.setAttribute(xmlName.toQname(), ScriptRuntime.toString(value)); }
void setAttribute(XMLName xmlName, Object value) { if (!isElement()) throw new IllegalStateException("Can only set attributes on elements."); // TODO Is this legal, but just not "supported"? If so, support it. if (xmlName.uri() == null && xmlName.localName().equals("*")) { throw ScriptRuntime.typeError("@* assignment not supported."); } this.node.setAttribute(xmlName.toQname(), ScriptRuntime.toString(value)); }