Package org.mozilla.javascript.xmlimpl
Class XMLCtor
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.BaseFunction
org.mozilla.javascript.IdFunctionObject
org.mozilla.javascript.xmlimpl.XMLCtor
- All Implemented Interfaces:
Serializable
,Callable
,ConstProperties
,Constructable
,DebuggableObject
,Function
,IdFunctionCall
,Scriptable
,SymbolScriptable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private XmlProcessor
(package private) static final long
private static final Object
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 -
Method Summary
Modifier and TypeMethodDescriptionexecIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.protected int
Map name to id of instance property.protected int
protected String
getInstanceIdName
(int id) Map id back to property name it defines.protected Object
getInstanceIdValue
(int id) Get id value.protected int
Get maximum id findInstanceIdInfo can generate.boolean
hasInstance
(Scriptable instance) hasInstance for XML objects works differently than other objects; see ECMA357 13.4.3.10.protected void
initPrototypeId
(int id) private void
readSettings
(Scriptable source) protected void
setInstanceIdValue
(int id, Object value) Set or delete id value.private void
writeSetting
(Scriptable target) Methods inherited from class org.mozilla.javascript.IdFunctionObject
addAsProperty, call, createObject, exportAsScopeProperty, getArity, getFunctionName, getLength, getPrototype, getTag, hasTag, initFunction, markAsConstructor, methodId, unknown
Methods inherited from class org.mozilla.javascript.BaseFunction
construct, fillConstructorProperties, getClassName, getClassPrototype, getPrototypeProperty, getTypeOf, hasPrototypeProperty, isGeneratorFunction, setImmunePrototypeProperty, setInstanceIdAttributes, setPrototypeProperty, setPrototypePropertyAttributes, setStandardPropertyAttributes, setupDefaultPrototype
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, findInstanceIdInfo, findPrototypeId, get, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes
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, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getDefaultValue, getIds, getParentScope, has, has, put, put, setParentScope, setPrototype
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
XMLCTOR_TAG
-
options
-
Id_ignoreComments
private static final int Id_ignoreComments- See Also:
-
Id_ignoreProcessingInstructions
private static final int Id_ignoreProcessingInstructions- See Also:
-
Id_ignoreWhitespace
private static final int Id_ignoreWhitespace- See Also:
-
Id_prettyIndent
private static final int Id_prettyIndent- See Also:
-
Id_prettyPrinting
private static final int Id_prettyPrinting- See Also:
-
MAX_INSTANCE_ID
private static final int MAX_INSTANCE_ID- See Also:
-
Id_defaultSettings
private static final int Id_defaultSettings- See Also:
-
Id_settings
private static final int Id_settings- See Also:
-
Id_setSettings
private static final int Id_setSettings- See Also:
-
MAX_FUNCTION_ID
private static final int MAX_FUNCTION_ID- See Also:
-
-
Constructor Details
-
XMLCtor
-
-
Method Details
-
writeSetting
-
readSettings
-
getMaxInstanceId
protected int getMaxInstanceId()Description copied from class:IdScriptableObject
Get maximum id findInstanceIdInfo can generate.- Overrides:
getMaxInstanceId
in classBaseFunction
-
findInstanceIdInfo
Description copied from class:IdScriptableObject
Map name to id of instance property. Should return 0 if not found or the result ofIdScriptableObject.instanceIdInfo(int, int)
.- Overrides:
findInstanceIdInfo
in classBaseFunction
-
getInstanceIdName
Description copied from class:IdScriptableObject
Map id back to property name it defines.- Overrides:
getInstanceIdName
in classBaseFunction
-
getInstanceIdValue
Description copied from class:IdScriptableObject
Get id value. * If id value is constant, descendant can call cacheIdValue to store * value in the permanent cache. * Default implementation creates IdFunctionObject instance for given id * and cache its value- Overrides:
getInstanceIdValue
in classBaseFunction
-
setInstanceIdValue
Description copied from class:IdScriptableObject
Set or delete id value. If value == NOT_FOUND , the implementation should make sure that the following getInstanceIdValue return NOT_FOUND.- Overrides:
setInstanceIdValue
in classBaseFunction
-
findPrototypeId
- Overrides:
findPrototypeId
in classBaseFunction
-
initPrototypeId
protected void initPrototypeId(int id) - Overrides:
initPrototypeId
in classBaseFunction
-
execIdCall
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Description copied from class:IdScriptableObject
'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.- Specified by:
execIdCall
in interfaceIdFunctionCall
- Overrides:
execIdCall
in classBaseFunction
-
hasInstance
hasInstance for XML objects works differently than other objects; see ECMA357 13.4.3.10.- Specified by:
hasInstance
in interfaceScriptable
- Overrides:
hasInstance
in classBaseFunction
- Parameters:
instance
- The value that appeared on the LHS of the instanceof operator- Returns:
- true if the "prototype" property of "this" appears in value's prototype chain
-