Class XMLList
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.xml.XMLObject
org.mozilla.javascript.xmlimpl.XMLObjectImpl
org.mozilla.javascript.xmlimpl.XMLList
- All Implemented Interfaces:
Serializable, Callable, ConstProperties, Constructable, DebuggableObject, Function, IdFunctionCall, Scriptable, SymbolScriptable
-
Nested Class Summary
Nested classes/interfaces inherited from class ScriptableObject
ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XmlNode.InternalList(package private) static final longprivate XMLObjectImplprivate XmlNode.QNameFields inherited from class ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddMatches(XMLList rv, XMLName name) (package private) voidprivate ObjectapplyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Call the function.(package private) XMLListchild(int index) (package private) XMLList(package private) XMLListchildren()(package private) XMLListcomments()construct(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.(package private) boolean(package private) XMLObjectImplcopy()voiddelete(int index) Removes the indexed property from the object.(package private) voiddeleteXMLProperty(XMLName name) ecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) XMLList(package private) booleanequivalentXml(Object target) Test XML equality with target the target.get(int index, Scriptable start) Returns the value of the indexed property or NOT_FOUND.Return the name of the class.See ECMA 357, 11_2_2_1, Semantics, 3_e.Object[]getIds()Returns an array of ids for the properties of the object.Object[](package private) XmlNode.InternalListprivate XMLListgetPropertyList(XMLName name) (package private) XMLgetXML()private XMLgetXML(XmlNode.InternalList _annos, int index) private XMLgetXmlFromAnnotation(int index) (package private) ObjectgetXMLProperty(XMLName name) ecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.booleanhas(int index, Scriptable start) Returns true if the property index is defined.(package private) boolean(package private) booleanhasOwnProperty(XMLName xmlName) (package private) boolean(package private) booleanhasXMLProperty(XMLName xmlName) ecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.private voidprivate voidinternalRemoveFromList(int index) (package private) XMLitem(int index) protected ObjectjsConstructor(Context cx, boolean inNewExpr, Object[] args) (package private) intlength()(package private) void(package private) Objectparent()If list is empty, return undefined, if elements have different parents return undefined, If they all have the same parent, return that parent(package private) XMLListprocessingInstructions(XMLName xmlName) (package private) booleanpropertyIsEnumerable(Object name) voidput(int index, Scriptable start, Object value) Sets the value of the indexed property, creating it if need be.(package private) voidputXMLProperty(XMLName xmlName, Object value) ecmaPut(cx, id, value) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) voidremove()(package private) voidprivate voidreplaceNode(XML xml, XML with) private voidsetAttribute(XMLName xmlName, Object value) (package private) voidsetTargets(XMLObjectImpl object, XmlNode.QName property) (package private) XMLListtext()(package private) StringtoSource(int indent) toString()(package private) String(package private) ObjectvalueOf()Methods inherited from class XMLObjectImpl
addValues, createEmptyXML, createNamespace, createNamespaces, delete, delete, ecmaEscapeAttributeValue, ecmaToXml, enterDotQuery, enterWith, equivalentValues, execIdCall, exportAsJSClass, findPrototypeId, get, get, getDefaultValue, getFunctionProperty, getFunctionProperty, getLib, getParentScope, getProcessor, getPrototype, has, has, hasInstance, initialize, initPrototypeId, isPrototype, memberRef, memberRef, newQName, newQName, newTextElementXML, newXML, newXMLFromJs, newXMLList, newXMLListFrom, put, put, setParentScope, setPrototype, xmlFromNodeMethods inherited from class IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findInstanceIdInfo, findPrototypeId, get, getAttributes, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdAttributes, setInstanceIdValueMethods inherited from class ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getProperty, getProperty, getProperty, getPropertyIds, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, sizeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Scriptable
delete, get, getDefaultValue, getParentScope, getPrototype, has, hasInstance, put, setParentScope, setPrototype
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
_annos
-
targetObject
-
targetProperty
-
-
Constructor Details
-
XMLList
XMLList(XMLLibImpl lib, Scriptable scope, XMLObject prototype)
-
-
Method Details
-
getNodeList
XmlNode.InternalList getNodeList() -
setTargets
-
getXmlFromAnnotation
-
getXML
XML getXML()- Specified by:
getXMLin classXMLObjectImpl
-
internalRemoveFromList
private void internalRemoveFromList(int index) -
replace
-
insert
-
getClassName
Description copied from class:ScriptableObjectReturn the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassNamein interfaceScriptable- Specified by:
getClassNamein classScriptableObject
-
get
Description copied from class:ScriptableObjectReturns the value of the indexed property or NOT_FOUND.- Specified by:
getin interfaceScriptable- Overrides:
getin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object in which the lookup began- Returns:
- the value of the property (may be null), or NOT_FOUND
- See Also:
-
hasXMLProperty
Description copied from class:XMLObjectImplecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
hasXMLPropertyin classXMLObjectImpl
-
has
Description copied from class:ScriptableObjectReturns true if the property index is defined.- Specified by:
hasin interfaceScriptable- Overrides:
hasin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object in which the lookup began- Returns:
- true if and only if the property was found in the object
- See Also:
-
putXMLProperty
Description copied from class:XMLObjectImplecmaPut(cx, id, value) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
putXMLPropertyin classXMLObjectImpl
-
getXMLProperty
Description copied from class:XMLObjectImplecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
getXMLPropertyin classXMLObjectImpl
-
replaceNode
-
put
Description copied from class:ScriptableObjectSets the value of the indexed property, creating it if need be.- Specified by:
putin interfaceScriptable- Overrides:
putin classScriptableObject- Parameters:
index- the numeric index for the propertystart- the object whose property is being setvalue- value to set the property to- See Also:
-
getXML
-
deleteXMLProperty
Description copied from class:XMLObjectImplecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
deleteXMLPropertyin classXMLObjectImpl
-
delete
public void delete(int index) Description copied from class:ScriptableObjectRemoves the indexed property from the object.If the property is not found, or it has the PERMANENT attribute, no action is taken.
- Specified by:
deletein interfaceScriptable- Overrides:
deletein classScriptableObject- Parameters:
index- the numeric index for the property- See Also:
-
getIds
Description copied from class:ScriptableObjectReturns an array of ids for the properties of the object.Any properties with the attribute DONTENUM are not listed.
- Specified by:
getIdsin interfaceScriptable- Overrides:
getIdsin classScriptableObject- Returns:
- an array of java.lang.Objects with an entry for every listed property. Properties accessed via an integer index will have a corresponding Integer entry in the returned array. Properties accessed by a String will have a String entry in the returned array.
-
getIdsForDebug
-
remove
void remove() -
item
-
setAttribute
-
addToList
-
child
- Specified by:
childin classXMLObjectImpl
-
child
- Specified by:
childin classXMLObjectImpl
-
addMatches
- Specified by:
addMatchesin classXMLObjectImpl
-
children
XMLList children()- Specified by:
childrenin classXMLObjectImpl
-
comments
XMLList comments()- Specified by:
commentsin classXMLObjectImpl
-
elements
- Specified by:
elementsin classXMLObjectImpl
-
contains
- Specified by:
containsin classXMLObjectImpl
-
copy
XMLObjectImpl copy()- Specified by:
copyin classXMLObjectImpl
-
hasOwnProperty
- Specified by:
hasOwnPropertyin classXMLObjectImpl
-
hasComplexContent
boolean hasComplexContent()- Specified by:
hasComplexContentin classXMLObjectImpl
-
hasSimpleContent
boolean hasSimpleContent()- Specified by:
hasSimpleContentin classXMLObjectImpl
-
length
int length()- Specified by:
lengthin classXMLObjectImpl
-
normalize
void normalize()- Specified by:
normalizein classXMLObjectImpl
-
parent
Object parent()If list is empty, return undefined, if elements have different parents return undefined, If they all have the same parent, return that parent- Specified by:
parentin classXMLObjectImpl
-
processingInstructions
- Specified by:
processingInstructionsin classXMLObjectImpl
-
propertyIsEnumerable
- Specified by:
propertyIsEnumerablein classXMLObjectImpl
-
text
XMLList text()- Specified by:
textin classXMLObjectImpl
-
toString
- Specified by:
toStringin classXMLObjectImpl
-
toSource
- Specified by:
toSourcein classXMLObjectImpl
-
toXMLString
String toXMLString()- Specified by:
toXMLStringin classXMLObjectImpl
-
valueOf
Object valueOf()- Specified by:
valueOfin classXMLObjectImpl
-
equivalentXml
Description copied from class:XMLObjectImplTest XML equality with target the target.- Specified by:
equivalentXmlin classXMLObjectImpl
-
getPropertyList
-
applyOrCall
private Object applyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) -
jsConstructor
- Specified by:
jsConstructorin classXMLObjectImpl
-
getExtraMethodSource
See ECMA 357, 11_2_2_1, Semantics, 3_e.- Specified by:
getExtraMethodSourcein classXMLObject
-
call
Description copied from interface:FunctionCall the function.Note that the array of arguments is not guaranteed to have length greater than 0.
- Specified by:
callin interfaceCallable- Specified by:
callin interfaceFunction- Parameters:
cx- the current Context for this threadscope- the scope to execute the function relative to. This is set to the value returned by getParentScope() except when the function is called from a closure.thisObj- the JavaScriptthisobjectargs- the array of arguments- Returns:
- the result of the call
-
construct
Description copied from interface:FunctionCall the function as a constructor.This method is invoked by the runtime in order to satisfy a use of the JavaScript
newoperator. This method is expected to create a new object and return it.- Specified by:
constructin interfaceConstructable- Specified by:
constructin interfaceFunction- Parameters:
cx- the current Context for this threadscope- an enclosing scope of the caller except when the function is called from a closure.args- the array of arguments- Returns:
- the allocated object
-