public abstract class NativeFunction extends BaseFunction
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
Constructor and Description |
---|
NativeFunction() |
Modifier and Type | Method and Description |
---|---|
int |
getArity() |
DebuggableScript |
getDebuggableView() |
java.lang.String |
getEncodedSource()
Get encoded source string.
|
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 java.lang.String |
getParamOrVarName(int index)
Get parameter or variable name.
|
void |
initScriptFunction(Context cx,
Scriptable scope) |
java.lang.String |
jsGet_name()
Deprecated.
Use
BaseFunction.getFunctionName() instead.
For backwards compatibility keep an old method name used by
Batik and possibly others. |
java.lang.Object |
resumeGenerator(Context cx,
Scriptable scope,
int operation,
java.lang.Object state,
java.lang.Object value)
Resume execution of a suspended generator.
|
call, construct, createObject, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getClassName, getClassPrototype, getFunctionName, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getPrototypeProperty, getTypeOf, hasInstance, hasPrototypeProperty, initPrototypeId, setImmunePrototypeProperty, setInstanceIdValue
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, defineOwnProperty, delete, exportAsJSClass, get, getAttributes, getOwnPropertyDescriptor, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdAttributes
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, delete, get, get, getDefaultValue, getIds, getParentScope, getPrototype, has, has, put, put, setParentScope, setPrototype
public final void initScriptFunction(Context cx, Scriptable scope)
public int getLength()
getLength
in class BaseFunction
public int getArity()
getArity
in class BaseFunction
public java.lang.String jsGet_name()
BaseFunction.getFunctionName()
instead.
For backwards compatibility keep an old method name used by
Batik and possibly others.public java.lang.String getEncodedSource()
public DebuggableScript getDebuggableView()
public java.lang.Object resumeGenerator(Context cx, Scriptable scope, int operation, java.lang.Object state, java.lang.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 java.lang.String getParamOrVarName(int index)
getParamCount()
, then return the name of the
corresponding parameter. Otherwise return the name of variable.protected boolean getParamOrVarConst(int index)
getParamCount()
, then return the const-ness
of the corresponding parameter. Otherwise return whether the variable is
const.