java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.BaseFunction
org.htmlunit.corejs.javascript.BoundFunction
- All Implemented Interfaces:
Serializable,Callable,ConstProperties<Scriptable>,Constructable,DebuggableObject,Function,PropHolder<Scriptable>,Scriptable,SymbolScriptable
The class for results of the Function.bind() operation EcmaScript 5 spec, 15.3.4.5
- Author:
- Raphael Speyer
- 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
ConstructorsConstructorDescriptionBoundFunction(Context cx, VarScope scope, Callable targetFunction, Scriptable boundThis, Object[] boundArgs) -
Method Summary
Modifier and TypeMethodDescriptionCall the function as a constructor.intbooleanhasInstance(Scriptable instance) Implements the instanceof operator for JavaScript Function objects.Methods inherited from class org.htmlunit.corejs.javascript.BaseFunction
call, createObject, createObject, createProperties, createPrototypeProperty, createPrototypeProperty, defaultGet, defaultHas, defaultPut, getArity, getClassName, getClassPrototype, getDeclarationScope, getHomeObject, getPrototypeProperty, getTypeOf, hasDefaultParameters, hasPrototypeProperty, isConstructor, 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, getPrototype, 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.Constructable
constructMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
delete, delete, delete, get, get, get, getAncestor, getDefaultValue, getIds, getParentScope, getPrototype, has, has, has, put, put, put, setParentScope, setPrototypeMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
BoundFunction
public BoundFunction(Context cx, VarScope scope, Callable targetFunction, Scriptable boundThis, Object[] boundArgs)
-
-
Method Details
-
call
- Overrides:
callin classBaseFunction
-
construct
Description copied from interface:FunctionCall 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.If nt is equal to this then this call is equivalent `new f(...arguments), but reflection and super constructor calls may pass in different values.
- Specified by:
constructin interfaceConstructable- Specified by:
constructin interfaceFunction- Overrides:
constructin classBaseFunction- Parameters:
cx- the current Context for this threadnt- the new.target for this call,scope- an enclosing scope of the caller except when the function is called from a closure.extraArgs- the array of arguments- Returns:
- the allocated object
-
hasInstance
Description copied from class:BaseFunctionImplements the instanceof operator for JavaScript Function objects.foo = new Foo();
foo instanceof Foo; // true
- 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
-
getLength
public int getLength()- Overrides:
getLengthin classBaseFunction
-
getFunctionName
- Overrides:
getFunctionNamein classBaseFunction
-