Package org.mozilla.javascript.xmlimpl
Class QName
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.xmlimpl.QName
- All Implemented Interfaces:
Serializable,ConstProperties,DebuggableObject,IdFunctionCall,Scriptable,SymbolScriptable
Class QName
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XmlNode.QNameprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate XMLLibImplprivate static final intprivate static final intprivate QNameprivate static final Object(package private) static final longFields 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 TypeMethodDescription(package private) QNamecastToQName(XMLLibImpl lib, Context cx, Object qnameValue) (package private) QNameconstructQName(XMLLibImpl lib, Context cx, Object nameValue) (package private) QNameconstructQName(XMLLibImpl lib, Context cx, Object namespace, Object name) (package private) static QNamecreate(XMLLibImpl lib, Scriptable scope, QName prototype, XmlNode.QName delegate) booleanprivate booleanprotected ObjectequivalentValues(Object value) Custom==operator.execIdCall(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.(package private) voidexportAsJSClass(boolean sealed) protected intMap name to id of instance property.protected intReturn the name of the class.getDefaultValue(Class<?> hint) Implements the [[DefaultValue]] internal method.(package private) final XmlNode.QNameprotected 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.inthashCode()protected voidinitPrototypeId(int id) private Stringprivate ObjectjsConstructor(Context cx, boolean inNewExpr, Object[] args) (package private) QNamenewQName(XMLLibImpl lib, String q_uri, String q_localName, String q_prefix) (package private) Stringprefix()private QNamerealThis(Scriptable thisObj, IdFunctionObject f) (package private) final XmlNode.QNameDeprecated.private static voidtoSourceImpl(String uri, String localName, String prefix, StringBuilder sb) toString()(package private) Stringuri()Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, get, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValueMethods 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, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, 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
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
QNAME_TAG
-
lib
-
prototype
-
delegate
-
Id_localName
private static final int Id_localName- See Also:
-
Id_uri
private static final int Id_uri- See Also:
-
MAX_INSTANCE_ID
private static final int MAX_INSTANCE_ID- See Also:
-
Id_constructor
private static final int Id_constructor- See Also:
-
Id_toString
private static final int Id_toString- See Also:
-
Id_toSource
private static final int Id_toSource- See Also:
-
MAX_PROTOTYPE_ID
private static final int MAX_PROTOTYPE_ID- See Also:
-
-
Constructor Details
-
QName
private QName()
-
-
Method Details
-
create
-
exportAsJSClass
void exportAsJSClass(boolean sealed) -
toString
-
localName
-
prefix
String prefix() -
uri
String uri() -
toNodeQname
Deprecated. -
getDelegate
-
equals
-
hashCode
public int hashCode() -
equivalentValues
Description copied from class:ScriptableObjectCustom==operator. Must returnScriptable.NOT_FOUNDif this object does not have custom equality operator for the given value,Boolean.TRUEif this object is equivalent tovalue,Boolean.FALSEif this object is not equivalent tovalue.The default implementation returns Boolean.TRUE if
this == valueorScriptable.NOT_FOUNDotherwise. It indicates that by default custom equality is available only ifvalueisthisin which case true is returned.- Overrides:
equivalentValuesin classScriptableObject
-
equals
-
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
-
getDefaultValue
Description copied from class:ScriptableObjectImplements the [[DefaultValue]] internal method.Note that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.
A
hintof null means "no hint".- Specified by:
getDefaultValuein interfaceScriptable- Overrides:
getDefaultValuein classScriptableObject- Parameters:
hint- the type hint- Returns:
- the default value for the object
See ECMA 8.6.2.6.
-
getMaxInstanceId
protected int getMaxInstanceId()Description copied from class:IdScriptableObjectGet maximum id findInstanceIdInfo can generate.- Overrides:
getMaxInstanceIdin classIdScriptableObject
-
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 classIdScriptableObject
-
getInstanceIdName
Description copied from class:IdScriptableObjectMap id back to property name it defines.- Overrides:
getInstanceIdNamein classIdScriptableObject
-
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 classIdScriptableObject
-
findPrototypeId
- Overrides:
findPrototypeIdin classIdScriptableObject
-
initPrototypeId
protected void initPrototypeId(int id) - Overrides:
initPrototypeIdin classIdScriptableObject
-
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 classIdScriptableObject
-
realThis
-
newQName
-
constructQName
-
constructQName
-
castToQName
-
jsConstructor
-
js_toSource
-
toSourceImpl
-