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 intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate XmlProcessor(package private) static final longprivate static final ObjectFields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields 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 intMap name to id of instance property.protected intprotected StringgetInstanceIdName(int id) Map id back to property name it defines.protected ObjectgetInstanceIdValue(int id) Get id value.protected intGet maximum id findInstanceIdInfo can generate.booleanhasInstance(Scriptable instance) hasInstance for XML objects works differently than other objects; see ECMA357 13.4.3.10.protected voidinitPrototypeId(int id) private voidreadSettings(Scriptable source) protected voidsetInstanceIdValue(int id, Object value) Set or delete id value.private voidwriteSetting(Scriptable target) Methods inherited from class org.mozilla.javascript.IdFunctionObject
addAsProperty, call, createObject, exportAsScopeProperty, getArity, getFunctionName, getLength, getPrototype, getTag, hasTag, initFunction, markAsConstructor, methodId, unknownMethods inherited from class org.mozilla.javascript.BaseFunction
construct, fillConstructorProperties, getClassName, getClassPrototype, getPrototypeProperty, getTypeOf, hasPrototypeProperty, isGeneratorFunction, setImmunePrototypeProperty, setInstanceIdAttributes, setPrototypeProperty, setPrototypePropertyAttributes, setStandardPropertyAttributes, setupDefaultPrototypeMethods 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, setAttributesMethods 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, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IdScriptableObjectGet maximum id findInstanceIdInfo can generate.- Overrides:
getMaxInstanceIdin classBaseFunction
-
findInstanceIdInfo
Description copied from class:IdScriptableObjectMap name to id of instance property. Should return 0 if not found or the result ofIdScriptableObject.instanceIdInfo(int, int).- Overrides:
findInstanceIdInfoin classBaseFunction
-
getInstanceIdName
Description copied from class:IdScriptableObjectMap id back to property name it defines.- Overrides:
getInstanceIdNamein classBaseFunction
-
getInstanceIdValue
Description copied from class:IdScriptableObjectGet 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:
getInstanceIdValuein classBaseFunction
-
setInstanceIdValue
Description copied from class:IdScriptableObjectSet or delete id value. If value == NOT_FOUND , the implementation should make sure that the following getInstanceIdValue return NOT_FOUND.- Overrides:
setInstanceIdValuein classBaseFunction
-
findPrototypeId
- Overrides:
findPrototypeIdin classBaseFunction
-
initPrototypeId
protected void initPrototypeId(int id) - Overrides:
initPrototypeIdin 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:
execIdCallin interfaceIdFunctionCall- Overrides:
execIdCallin classBaseFunction
-
hasInstance
hasInstance for XML objects works differently than other objects; see ECMA357 13.4.3.10.- Specified by:
hasInstancein interfaceScriptable- Overrides:
hasInstancein 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
-