public abstract class NativeFunction extends BaseFunction
ScriptableObject.KeyComparator, ScriptableObject.LambdaGetterFunction, ScriptableObject.LambdaSetterFunctionId_arguments, Id_arity, Id_length, Id_name, Id_prototype, MAX_INSTANCE_IDCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
NativeFunction() |
| Modifier and Type | Method and Description |
|---|---|
int |
getArity() |
DebuggableScript |
getDebuggableView() |
protected abstract int |
getLanguageVersion() |
int |
getLength() |
protected abstract int |
getParamAndVarCount()
Get number of declared parameters and variables defined through var statements.
|
protected abstract int |
getParamCount()
Get number of declared parameters.
|
protected boolean |
getParamOrVarConst(int index)
Get parameter or variable const-ness.
|
protected abstract String |
getParamOrVarName(int index)
Get parameter or variable name.
|
String |
getRawSource()
Get raw source string.
|
void |
initScriptFunction(Context cx,
Scriptable scope) |
void |
initScriptFunction(Context cx,
Scriptable scope,
boolean es6GeneratorFunction,
boolean isShorthand) |
boolean |
isShorthand() |
abstract boolean |
isStrict() |
String |
jsGet_name()
Deprecated.
Use
BaseFunction.getFunctionName() instead. For backwards compatibility
keep an old method name used by Batik and possibly others. |
Object |
resumeGenerator(Context cx,
Scriptable scope,
int operation,
Object state,
Object value)
Resume execution of a suspended generator.
|
call, construct, createObject, createProperties, createPrototypeProperty, defaultGet, defaultHas, defaultPut, getClassName, getClassPrototype, getFunctionName, getHomeObject, getPrototypeProperty, getTypeOf, hasDefaultParameters, hasInstance, hasPrototypeProperty, includeNonStandardProps, isGeneratorFunction, setHomeObject, setImmunePrototypeProperty, setPrototypeProperty, setPrototypePropertyAttributes, setStandardPropertyAttributes, setupDefaultPrototypeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, 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, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizecreateSlotMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, delete, get, get, getDefaultValue, getIds, getParentScope, getPrototype, has, has, put, put, setParentScope, setPrototypepublic final void initScriptFunction(Context cx, Scriptable scope)
public final void initScriptFunction(Context cx, Scriptable scope, boolean es6GeneratorFunction, boolean isShorthand)
public int getLength()
getLength in class BaseFunctionpublic int getArity()
getArity in class BaseFunction@Deprecated public String jsGet_name()
BaseFunction.getFunctionName() instead. For backwards compatibility
keep an old method name used by Batik and possibly others.public String getRawSource()
public DebuggableScript getDebuggableView()
public Object resumeGenerator(Context cx, Scriptable scope, int operation, Object state, Object value)
cx - The current contextscope - Scope for the parent generator functionoperation - The resumption operation (next, send, etc.. )state - The generator state (has locals, stack, etc.)value - The return value of yield (if required).protected abstract int getLanguageVersion()
protected abstract int getParamCount()
protected abstract int getParamAndVarCount()
protected abstract String getParamOrVarName(int index)
index < getParamCount(), then
return the name of the corresponding parameter. Otherwise return the name of variable.protected boolean getParamOrVarConst(int index)
index < getParamCount(),
then return the const-ness of the corresponding parameter. Otherwise return whether the
variable is const.public abstract boolean isStrict()
public boolean isShorthand()
Copyright © 2025 HtmlUnit. All rights reserved.