java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.BaseFunction
org.htmlunit.corejs.javascript.IdFunctionObject
- All Implemented Interfaces:
Serializable,Callable,ConstProperties<Scriptable>,Constructable,DebuggableObject,Function,PropHolder<Scriptable>,Scriptable,SymbolScriptable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
ScriptableObject.DescriptorInfo, ScriptableObject.KeyComparator, ScriptableObject.LambdaGetterFunction, ScriptableObject.LambdaSetterFunction -
Field Summary
Fields inherited from class org.htmlunit.corejs.javascript.BaseFunction
Id_arguments, Id_arity, Id_length, Id_name, Id_prototype, MAX_INSTANCE_IDFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, LEGACY_CONST, PERMANENT, READONLY, STRICTLY_READONLY, UNINITIALIZED_CONSTFields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
isSealedFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionIdFunctionObject(IdFunctionCall idcall, Object tag, int id, int arity) IdFunctionObject(IdFunctionCall idcall, Object tag, int id, String name, int arity, VarScope scope) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T extends PropHolder<T>>
voidaddAsProperty(T target) Call the function as a constructor.createObject(Context cx, VarScope scope) Creates new script object.voidintgetArity()intReturns the prototype of the object.getTag()final ScriptablegetThisObj(Object thisObj) final booleanvoidinitFunction(String name, VarScope scope) booleanReturn whether this function can be called as a constructor.final voidmarkAsConstructor(Scriptable prototypeProperty) final intmethodId()final RuntimeExceptionunknown()Methods inherited from class org.htmlunit.corejs.javascript.BaseFunction
call, construct, createObject, createProperties, createPrototypeProperty, createPrototypeProperty, defaultGet, defaultHas, defaultPut, getClassName, getClassPrototype, getDeclarationScope, getHomeObject, getPrototypeProperty, getTypeOf, hasDefaultParameters, hasInstance, hasPrototypeProperty, isGeneratorFunction, prototypeDescSetter, setHomeObject, setImmunePrototypeProperty, setPrototypeProperty, setPrototypePropertyAttributes, setStandardPropertyAttributes, setupDefaultPrototypeMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, equivalentValues, get, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizeMethods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, createSlotMap, defineProperty, defineProperty, get, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
delete, delete, delete, get, get, get, getAncestor, getDefaultValue, getIds, getParentScope, has, has, has, put, put, put, setParentScope, setPrototypeMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
IdFunctionObject
-
IdFunctionObject
public IdFunctionObject(IdFunctionCall idcall, Object tag, int id, String name, int arity, VarScope scope)
-
-
Method Details
-
initFunction
-
hasTag
-
getTag
-
methodId
public final int methodId() -
markAsConstructor
-
addAsProperty
-
exportAsScopeProperty
public void exportAsScopeProperty() -
getPrototype
Description copied from class:ScriptableObjectReturns the prototype of the object.- Specified by:
getPrototypein interfaceScriptable- Overrides:
getPrototypein classScriptableObject- Returns:
- the prototype
-
call
- Overrides:
callin classBaseFunction
-
getThisObj
-
construct
Description copied from interface:ConstructableCall 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.- 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
-
createObject
Description copied from class:BaseFunctionCreates new script object. The default implementation ofBaseFunction.construct(org.htmlunit.corejs.javascript.Context, java.lang.Object, org.htmlunit.corejs.javascript.VarScope, java.lang.Object[])uses this method to to get the value forthisObjargument when invokingBaseFunction.call(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.VarScope, java.lang.Object, java.lang.Object[]). The method is allowed to returnnullto indicate thatBaseFunction.call(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.VarScope, java.lang.Object, java.lang.Object[])will create a new object itself. In this caseBaseFunction.construct(org.htmlunit.corejs.javascript.Context, java.lang.Object, org.htmlunit.corejs.javascript.VarScope, java.lang.Object[])will set scope and prototype on the resultBaseFunction.call(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.VarScope, java.lang.Object, java.lang.Object[])unless they are already set.- Overrides:
createObjectin classBaseFunction
-
getArity
public int getArity()- Overrides:
getArityin classBaseFunction
-
getLength
public int getLength()- Overrides:
getLengthin classBaseFunction
-
isConstructor
public boolean isConstructor()Description copied from interface:FunctionReturn whether this function can be called as a constructor.- Specified by:
isConstructorin interfaceFunction- Overrides:
isConstructorin classBaseFunction
-
getFunctionName
- Overrides:
getFunctionNamein classBaseFunction
-
unknown
-