Package org.mozilla.javascript.xmlimpl
Class XML
- All Implemented Interfaces:
Serializable
,ConstProperties
,DebuggableObject
,IdFunctionCall
,Scriptable
,SymbolScriptable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprivate XmlNode.Namespace
private void
(package private) void
addMatches
(XMLList rv, XMLName name) (package private) XML
(package private) XML
appendChild
(Object xml) (package private) XMLList
child
(int index) (package private) XMLList
(package private) int
(package private) XMLList
children()
(package private) XMLList
comments()
(package private) boolean
(package private) XMLObjectImpl
copy()
void
delete
(int index) Removes the indexed property from the object.(package private) void
deleteXMLProperty
(XMLName name) ecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) final String
private String
private String
(package private) XMLList
(package private) boolean
equivalentXml
(Object target) Test XML equality with target the target.get
(int index, Scriptable start) Returns the value of the indexed property or NOT_FOUND.(package private) XmlNode
(package private) XML[]
private int
getChildIndexOf
(XML child) (package private) XML[]
Return the name of the class.Return an additional object to look for methods that runtime should consider during method search.Object[]
getIds()
Returns an array of ids for the properties of the object.(package private) XML
(package private) XmlNode.QName
private XmlNode[]
getNodesForInsert
(Object value) (package private) XMLList
getPropertyList
(XMLName name) (package private) final XML
getXML()
(package private) XML
getXmlChild
(int index) (package private) Object
getXMLProperty
(XMLName xmlName) ecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.boolean
has
(int index, Scriptable start) Returns true if the property index is defined.(package private) boolean
(package private) boolean
hasOwnProperty
(XMLName xmlName) (package private) boolean
(package private) boolean
hasXMLProperty
(XMLName xmlName) ecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.(package private) void
initialize
(XmlNode node) (package private) Namespace[]
(package private) XML
insertChildAfter
(XML child, Object xml) (package private) XML
insertChildBefore
(XML child, Object xml) (package private) boolean
(package private) final boolean
(package private) final boolean
(package private) final boolean
(package private) final boolean
(package private) final boolean
isText()
protected Object
jsConstructor
(Context cx, boolean inNewExpr, Object[] args) (package private) int
length()
(package private) String
(package private) XML
makeXmlFromString
(XMLName name, String value) (package private) QName
name()
(package private) Namespace
(package private) Namespace[]
(package private) Object
nodeKind()
(package private) void
(package private) Object
parent()
(package private) XML
prependChild
(Object xml) (package private) XMLList
processingInstructions
(XMLName xmlName) (package private) boolean
propertyIsEnumerable
(Object name) void
put
(int index, Scriptable start, Object value) Sets the value of the indexed property, creating it if need be.(package private) void
putXMLProperty
(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) void
remove()
(package private) void
removeChild
(int index) (package private) XML
(package private) XML
(package private) XML
(package private) void
replaceWith
(XML value) (package private) void
setAttribute
(XMLName xmlName, Object value) (package private) XML
setChildren
(Object xml) (package private) void
setLocalName
(String localName) (package private) void
(package private) void
(package private) XMLList
text()
(package private) Node
(package private) String
toSource
(int indent) toString()
private XML
(package private) String
(package private) Object
valueOf()
Methods inherited from class org.mozilla.javascript.xmlimpl.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, xmlFromNode
Methods inherited from class org.mozilla.javascript.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, setInstanceIdValue
Methods inherited from class org.mozilla.javascript.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, size
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
node
-
-
Constructor Details
-
XML
XML(XMLLibImpl lib, Scriptable scope, XMLObject prototype, XmlNode node)
-
-
Method Details
-
initialize
-
getXML
- Specified by:
getXML
in classXMLObjectImpl
-
replaceWith
-
makeXmlFromString
-
getAnnotation
XmlNode getAnnotation() -
get
Description copied from class:ScriptableObject
Returns the value of the indexed property or NOT_FOUND.- Specified by:
get
in interfaceScriptable
- Overrides:
get
in 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:
-
has
Description copied from class:ScriptableObject
Returns true if the property index is defined.- Specified by:
has
in interfaceScriptable
- Overrides:
has
in 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:
-
put
Description copied from class:ScriptableObject
Sets the value of the indexed property, creating it if need be.- Specified by:
put
in interfaceScriptable
- Overrides:
put
in classScriptableObject
- Parameters:
index
- the numeric index for the propertystart
- the object whose property is being setvalue
- value to set the property to- See Also:
-
getIds
Description copied from class:ScriptableObject
Returns an array of ids for the properties of the object.Any properties with the attribute DONTENUM are not listed.
- Specified by:
getIds
in interfaceScriptable
- Overrides:
getIds
in 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.
-
delete
public void delete(int index) Description copied from class:ScriptableObject
Removes the indexed property from the object.If the property is not found, or it has the PERMANENT attribute, no action is taken.
- Specified by:
delete
in interfaceScriptable
- Overrides:
delete
in classScriptableObject
- Parameters:
index
- the numeric index for the property- See Also:
-
hasXMLProperty
Description copied from class:XMLObjectImpl
ecmaHas(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
hasXMLProperty
in classXMLObjectImpl
-
getXMLProperty
Description copied from class:XMLObjectImpl
ecmaGet(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
getXMLProperty
in classXMLObjectImpl
-
getNodeQname
XmlNode.QName getNodeQname() -
getChildren
XML[] getChildren() -
getAttributes
XML[] getAttributes() -
getPropertyList
-
deleteXMLProperty
Description copied from class:XMLObjectImpl
ecmaDelete(cx, id) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
deleteXMLProperty
in classXMLObjectImpl
-
putXMLProperty
Description copied from class:XMLObjectImpl
ecmaPut(cx, id, value) calls this after resolving when id to XMLName and checking it is not Uint32 index.- Specified by:
putXMLProperty
in classXMLObjectImpl
-
hasOwnProperty
- Specified by:
hasOwnProperty
in classXMLObjectImpl
-
jsConstructor
- Specified by:
jsConstructor
in classXMLObjectImpl
-
getExtraMethodSource
Description copied from class:XMLObject
Return an additional object to look for methods that runtime should consider during method search. Return null if no such object available.- Specified by:
getExtraMethodSource
in classXMLObject
-
removeChild
void removeChild(int index) -
normalize
void normalize()- Specified by:
normalize
in classXMLObjectImpl
-
toXML
-
setAttribute
-
remove
void remove() -
addMatches
- Specified by:
addMatches
in classXMLObjectImpl
-
elements
- Specified by:
elements
in classXMLObjectImpl
-
child
- Specified by:
child
in classXMLObjectImpl
-
replace
-
children
XMLList children()- Specified by:
children
in classXMLObjectImpl
-
child
- Specified by:
child
in classXMLObjectImpl
-
getXmlChild
-
getLastXmlChild
XML getLastXmlChild() -
childIndex
int childIndex() -
contains
- Specified by:
contains
in classXMLObjectImpl
-
equivalentXml
Description copied from class:XMLObjectImpl
Test XML equality with target the target.- Specified by:
equivalentXml
in classXMLObjectImpl
-
copy
XMLObjectImpl copy()- Specified by:
copy
in classXMLObjectImpl
-
hasSimpleContent
boolean hasSimpleContent()- Specified by:
hasSimpleContent
in classXMLObjectImpl
-
hasComplexContent
boolean hasComplexContent()- Specified by:
hasComplexContent
in classXMLObjectImpl
-
length
int length()- Specified by:
length
in classXMLObjectImpl
-
is
-
nodeKind
Object nodeKind() -
parent
Object parent()- Specified by:
parent
in classXMLObjectImpl
-
propertyIsEnumerable
- Specified by:
propertyIsEnumerable
in classXMLObjectImpl
-
valueOf
Object valueOf()- Specified by:
valueOf
in classXMLObjectImpl
-
comments
XMLList comments()- Specified by:
comments
in classXMLObjectImpl
-
text
XMLList text()- Specified by:
text
in classXMLObjectImpl
-
processingInstructions
- Specified by:
processingInstructions
in classXMLObjectImpl
-
getNodesForInsert
-
replace
-
prependChild
-
appendChild
-
getChildIndexOf
-
insertChildBefore
-
insertChildAfter
-
setChildren
-
addInScopeNamespace
-
inScopeNamespaces
Namespace[] inScopeNamespaces() -
adapt
-
removeNamespace
-
addNamespace
-
name
QName name() -
namespaceDeclarations
Namespace[] namespaceDeclarations() -
namespace
-
localName
String localName() -
setLocalName
-
setName
-
setNamespace
-
ecmaClass
-
getClassName
Description copied from class:ScriptableObject
Return the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassName
in interfaceScriptable
- Specified by:
getClassName
in classScriptableObject
-
ecmaValue
-
ecmaToString
-
toString
- Specified by:
toString
in classXMLObjectImpl
-
toSource
- Specified by:
toSource
in classXMLObjectImpl
-
toXMLString
String toXMLString()- Specified by:
toXMLString
in classXMLObjectImpl
-
isAttribute
final boolean isAttribute() -
isComment
final boolean isComment() -
isText
final boolean isText() -
isElement
final boolean isElement() -
isProcessingInstruction
final boolean isProcessingInstruction() -
toDomNode
Node toDomNode()
-