org.mozilla.javascript.xml

Class XMLObject

Implemented Interfaces:
DebuggableObject, IdFunctionCall, Scriptable, Serializable

public abstract class XMLObject
extends IdScriptableObject

This Interface describes what all XML objects (XML, XMLList) should have in common.
See Also:
XML

Field Summary

Fields inherited from class org.mozilla.javascript.ScriptableObject

DONTENUM, EMPTY, PERMANENT, READONLY

Fields inherited from interface org.mozilla.javascript.Scriptable

NOT_FOUND

Constructor Summary

XMLObject()
XMLObject(Scriptable scope, Scriptable prototype)

Method Summary

Object
addValues(Context cx, boolean thisIsLeft, Object value)
Custom + operator.
abstract boolean
ecmaDelete(Context cx, Object id)
Implementation of ECMAScript [[Delete]].
abstract Object
ecmaGet(Context cx, Object id)
Implementation of ECMAScript [[Get]].
abstract boolean
ecmaHas(Context cx, Object id)
Implementation of ECMAScript [[Has]].
abstract void
ecmaPut(Context cx, Object id, Object value)
Implementation of ECMAScript [[Put]].
abstract NativeWith
enterDotQuery(Scriptable scope)
Wrap this object into NativeWith to implement the .() query.
abstract NativeWith
enterWith(Scriptable scope)
Wrap this object into NativeWith to implement the with statement.
abstract Scriptable
getExtraMethodSource(Context cx)
Return an additional object to look for methods that runtime should consider during method search.
abstract Ref
memberRef(Context cx, Object namespace, Object elem, int memberTypeFlags)
Generic reference to implement x::ns, x.@ns::y, x..@ns::y etc.
abstract Ref
memberRef(Context cx, Object elem, int memberTypeFlags)
Generic reference to implement x.@y, x..y etc.

Methods inherited from class org.mozilla.javascript.IdScriptableObject

activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, execIdCall, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, get, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeId, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdValue

Methods inherited from class org.mozilla.javascript.ScriptableObject

associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype

Constructor Details

XMLObject

public XMLObject()

XMLObject

public XMLObject(Scriptable scope,
                 Scriptable prototype)

Method Details

addValues

public Object addValues(Context cx,
                        boolean thisIsLeft,
                        Object value)
Custom + operator. Should return Scriptable.NOT_FOUND if this object does not have custom addition operator for the given value, or the result of the addition operation.

The default implementation returns Scriptable.NOT_FOUND to indicate no custom addition operation.

Parameters:
cx - the Context object associated with the current thread.
thisIsLeft - if true, the object should calculate this + value if false, the object should calculate value + this.
value - the second argument for addition operation.

ecmaDelete

public abstract boolean ecmaDelete(Context cx,
                                   Object id)
Implementation of ECMAScript [[Delete]].

ecmaGet

public abstract Object ecmaGet(Context cx,
                               Object id)
Implementation of ECMAScript [[Get]].

ecmaHas

public abstract boolean ecmaHas(Context cx,
                                Object id)
Implementation of ECMAScript [[Has]].

ecmaPut

public abstract void ecmaPut(Context cx,
                             Object id,
                             Object value)
Implementation of ECMAScript [[Put]].

enterDotQuery

public abstract NativeWith enterDotQuery(Scriptable scope)
Wrap this object into NativeWith to implement the .() query.

enterWith

public abstract NativeWith enterWith(Scriptable scope)
Wrap this object into NativeWith to implement the with statement.

getExtraMethodSource

public abstract Scriptable getExtraMethodSource(Context cx)
Return an additional object to look for methods that runtime should consider during method search. Return null if no such object available.

memberRef

public abstract Ref memberRef(Context cx,
                              Object namespace,
                              Object elem,
                              int memberTypeFlags)
Generic reference to implement x::ns, x.@ns::y, x..@ns::y etc.

memberRef

public abstract Ref memberRef(Context cx,
                              Object elem,
                              int memberTypeFlags)
Generic reference to implement x.@y, x..y etc.