Package org.mozilla.javascript.xml
Class XMLObject
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- org.mozilla.javascript.IdScriptableObject
-
- org.mozilla.javascript.xml.XMLObject
-
- All Implemented Interfaces:
java.io.Serializable
,ConstProperties
,DebuggableObject
,IdFunctionCall
,Scriptable
public abstract class XMLObject extends IdScriptableObject
This Interface describes what all XML objects (XML, XMLList) should have in common.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
-
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description XMLObject()
XMLObject(Scriptable scope, Scriptable prototype)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
addValues(Context cx, boolean thisIsLeft, java.lang.Object value)
Custom + operator.abstract boolean
delete(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Delete]].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 java.lang.Object
get(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Get]].abstract Scriptable
getExtraMethodSource(Context cx)
Return an additional object to look for methods that runtime should consider during method search.abstract java.lang.Object
getFunctionProperty(Context cx, int id)
abstract java.lang.Object
getFunctionProperty(Context cx, java.lang.String name)
java.lang.String
getTypeOf()
Gets the value returned by calling the typeof operator on this object.abstract boolean
has(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Has]].abstract Ref
memberRef(Context cx, java.lang.Object elem, int memberTypeFlags)
Generic reference to implement x.@y, x..y etc.abstract Ref
memberRef(Context cx, java.lang.Object namespace, java.lang.Object elem, int memberTypeFlags)
Generic reference to implement x::ns, x.@ns::y, x..@ns::y etc.abstract void
put(Context cx, java.lang.Object id, java.lang.Object value)
Implementation of ECMAScript [[Put]].-
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, defineOwnProperty, delete, execIdCall, exportAsJSClass, get, getAttributes, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, put, setAttributes
-
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
Constructor Detail
-
XMLObject
public XMLObject()
-
XMLObject
public XMLObject(Scriptable scope, Scriptable prototype)
-
-
Method Detail
-
has
public abstract boolean has(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Has]].
-
get
public abstract java.lang.Object get(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Get]].
-
put
public abstract void put(Context cx, java.lang.Object id, java.lang.Object value)
Implementation of ECMAScript [[Put]].
-
delete
public abstract boolean delete(Context cx, java.lang.Object id)
Implementation of ECMAScript [[Delete]].
-
getFunctionProperty
public abstract java.lang.Object getFunctionProperty(Context cx, java.lang.String name)
-
getFunctionProperty
public abstract java.lang.Object getFunctionProperty(Context cx, int id)
-
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, java.lang.Object elem, int memberTypeFlags)
Generic reference to implement x.@y, x..y etc.
-
memberRef
public abstract Ref memberRef(Context cx, java.lang.Object namespace, java.lang.Object elem, int memberTypeFlags)
Generic reference to implement x::ns, x.@ns::y, x..@ns::y etc.
-
enterWith
public abstract NativeWith enterWith(Scriptable scope)
Wrap this object into NativeWith to implement the with statement.
-
enterDotQuery
public abstract NativeWith enterDotQuery(Scriptable scope)
Wrap this object into NativeWith to implement the .() query.
-
addValues
public java.lang.Object addValues(Context cx, boolean thisIsLeft, java.lang.Object value)
Custom + operator. Should returnScriptable.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.
-
getTypeOf
public java.lang.String getTypeOf()
Gets the value returned by calling the typeof operator on this object.- Overrides:
getTypeOf
in classScriptableObject
- Returns:
- "xml" or "undefined" if
ScriptableObject.avoidObjectDetection()
returnstrue
- See Also:
ScriptableObject.getTypeOf()
-
-