| java.lang.Object org.mozilla.javascript.ScriptableObject org.mozilla.javascript.IdScriptableObject org.mozilla.javascript.BaseFunction org.mozilla.javascript.NativeFunction
All known Subclasses: org.mozilla.javascript.InterpretedFunction,
NativeFunction | abstract public class NativeFunction extends BaseFunction (Code) | | This class implements the Function native object.
See ECMA 15.3.
author: Norris Boyd |
Method Summary | |
final String | decompile(int indent, int flags) | public int | getArity() | public DebuggableScript | getDebuggableView() | public String | getEncodedSource() Get encoded source string. | abstract protected int | getLanguageVersion() | public int | getLength() | abstract protected int | getParamAndVarCount() Get number of declared parameters and variables defined through var
statements. | abstract protected int | getParamCount() Get number of declared parameters. | protected boolean | getParamOrVarConst(int index) Get parameter or variable const-ness.
If index <
NativeFunction.getParamCount() , then return the const-ness
of the corresponding parameter. | abstract protected String | getParamOrVarName(int index) Get parameter or variable name.
If index <
NativeFunction.getParamCount() , then return the name of the
corresponding parameter. | final public void | initScriptFunction(Context cx, Scriptable scope) | public String | jsGet_name() | public Object | resumeGenerator(Context cx, Scriptable scope, int operation, Object state, Object value) Resume execution of a suspended generator.
Parameters: cx - The current context Parameters: scope - Scope for the parent generator function Parameters: operation - The resumption operation (next, send, etc.. |
decompile | final String decompile(int indent, int flags)(Code) | | Parameters: indent - How much to indent the decompiled result Parameters: flags - Flags specifying format of decompilation output |
getArity | public int getArity()(Code) | | |
getEncodedSource | public String getEncodedSource()(Code) | | Get encoded source string.
|
getLanguageVersion | abstract protected int getLanguageVersion()(Code) | | |
getLength | public int getLength()(Code) | | |
getParamAndVarCount | abstract protected int getParamAndVarCount()(Code) | | Get number of declared parameters and variables defined through var
statements.
|
getParamCount | abstract protected int getParamCount()(Code) | | Get number of declared parameters. It should be 0 for scripts.
|
getParamOrVarConst | protected boolean getParamOrVarConst(int index)(Code) | | Get parameter or variable const-ness.
If index <
NativeFunction.getParamCount() , then return the const-ness
of the corresponding parameter. Otherwise return whether the variable is
const.
|
getParamOrVarName | abstract protected String getParamOrVarName(int index)(Code) | | Get parameter or variable name.
If index <
NativeFunction.getParamCount() , then return the name of the
corresponding parameter. Otherwise return the name of variable.
|
resumeGenerator | public Object resumeGenerator(Context cx, Scriptable scope, int operation, Object state, Object value)(Code) | | Resume execution of a suspended generator.
Parameters: cx - The current context Parameters: scope - Scope for the parent generator function Parameters: operation - The resumption operation (next, send, etc.. ) Parameters: state - The generator state (has locals, stack, etc.) Parameters: value - The return value of yield (if required). The next yielded value (if any) |
Fields inherited from org.mozilla.javascript.BaseFunction | final static long serialVersionUID(Code)(Java Doc)
|
Methods inherited from org.mozilla.javascript.BaseFunction | public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)(Code)(Java Doc) public Scriptable construct(Context cx, Scriptable scope, Object[] args)(Code)(Java Doc) public Scriptable createObject(Context cx, Scriptable scope)(Code)(Java Doc) String decompile(int indent, int flags)(Code)(Java Doc) public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)(Code)(Java Doc) protected void fillConstructorProperties(IdFunctionObject ctor)(Code)(Java Doc) protected int findInstanceIdInfo(String s)(Code)(Java Doc) protected int findPrototypeId(String s)(Code)(Java Doc) public int getArity()(Code)(Java Doc) public String getClassName()(Code)(Java Doc) protected Scriptable getClassPrototype()(Code)(Java Doc) public String getFunctionName()(Code)(Java Doc) protected String getInstanceIdName(int id)(Code)(Java Doc) protected Object getInstanceIdValue(int id)(Code)(Java Doc) public int getLength()(Code)(Java Doc) protected int getMaxInstanceId()(Code)(Java Doc) final Object getPrototypeProperty()(Code)(Java Doc) public boolean hasInstance(Scriptable instance)(Code)(Java Doc) static void init(Scriptable scope, boolean sealed)(Code)(Java Doc) protected void initPrototypeId(int id)(Code)(Java Doc) static boolean isApply(IdFunctionObject f)(Code)(Java Doc) static boolean isApplyOrCall(IdFunctionObject f)(Code)(Java Doc) public void setImmunePrototypeProperty(Object value)(Code)(Java Doc) protected void setInstanceIdValue(int id, Object value)(Code)(Java Doc)
|
Methods inherited from org.mozilla.javascript.IdScriptableObject | final public void activatePrototypeMap(int maxPrototypeId)(Code)(Java Doc) protected void addIdFunctionProperty(Scriptable obj, Object tag, int id, String name, int arity)(Code)(Java Doc) final protected Object defaultGet(String name)(Code)(Java Doc) final protected void defaultPut(String name, Object value)(Code)(Java Doc) public void delete(String name)(Code)(Java Doc) public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)(Code)(Java Doc) final public IdFunctionObject exportAsJSClass(int maxPrototypeId, Scriptable scope, boolean sealed)(Code)(Java Doc) protected void fillConstructorProperties(IdFunctionObject ctor)(Code)(Java Doc) protected int findInstanceIdInfo(String name)(Code)(Java Doc) protected int findPrototypeId(String name)(Code)(Java Doc) public Object get(String name, Scriptable start)(Code)(Java Doc) public int getAttributes(String name)(Code)(Java Doc) Object[] getIds(boolean getAll)(Code)(Java Doc) protected String getInstanceIdName(int id)(Code)(Java Doc) protected Object getInstanceIdValue(int id)(Code)(Java Doc) protected int getMaxInstanceId()(Code)(Java Doc) public boolean has(String name, Scriptable start)(Code)(Java Doc) final public boolean hasPrototypeMap()(Code)(Java Doc) protected static EcmaError incompatibleCallError(IdFunctionObject f)(Code)(Java Doc) final public void initPrototypeConstructor(IdFunctionObject f)(Code)(Java Doc) protected void initPrototypeId(int id)(Code)(Java Doc) final public void initPrototypeMethod(Object tag, int id, String name, int arity)(Code)(Java Doc) final public void initPrototypeValue(int id, String name, Object value, int attributes)(Code)(Java Doc) protected static int instanceIdInfo(int attributes, int id)(Code)(Java Doc) public void put(String name, Scriptable start, Object value)(Code)(Java Doc) public void setAttributes(String name, int attributes)(Code)(Java Doc) protected void setInstanceIdValue(int id, Object value)(Code)(Java Doc)
|
Methods inherited from org.mozilla.javascript.ScriptableObject | void addLazilyInitializedValue(String name, int index, LazilyLoadedCtor init, int attributes)(Code)(Java Doc) final public Object associateValue(Object key, Object value)(Code)(Java Doc) public boolean avoidObjectDetection()(Code)(Java Doc) static BaseFunction buildClassCtor(Scriptable scope, Class clazz, boolean sealed, boolean mapInheritance) throws IllegalAccessException, InstantiationException, InvocationTargetException(Code)(Java Doc) public static Object callMethod(Scriptable obj, String methodName, Object[] args)(Code)(Java Doc) public static Object callMethod(Context cx, Scriptable obj, String methodName, Object[] args)(Code)(Java Doc) static void checkValidAttributes(int attributes)(Code)(Java Doc) public static void defineClass(Scriptable scope, Class clazz) throws IllegalAccessException, InstantiationException, InvocationTargetException(Code)(Java Doc) public static void defineClass(Scriptable scope, Class clazz, boolean sealed) throws IllegalAccessException, InstantiationException, InvocationTargetException(Code)(Java Doc) public static String defineClass(Scriptable scope, Class clazz, boolean sealed, boolean mapInheritance) throws IllegalAccessException, InstantiationException, InvocationTargetException(Code)(Java Doc) public void defineConst(String name, Scriptable start)(Code)(Java Doc) public static void defineConstProperty(Scriptable destination, String propertyName)(Code)(Java Doc) public void defineFunctionProperties(String[] names, Class clazz, int attributes)(Code)(Java Doc) public void defineProperty(String propertyName, Object value, int attributes)(Code)(Java Doc) public static void defineProperty(Scriptable destination, String propertyName, Object value, int attributes)(Code)(Java Doc) public void defineProperty(String propertyName, Class clazz, int attributes)(Code)(Java Doc) public void defineProperty(String propertyName, Object delegateTo, Method getter, Method setter, int attributes)(Code)(Java Doc) public void delete(String name)(Code)(Java Doc) public void delete(int index)(Code)(Java Doc) public static boolean deleteProperty(Scriptable obj, String name)(Code)(Java Doc) public static boolean deleteProperty(Scriptable obj, int index)(Code)(Java Doc) protected Object equivalentValues(Object value)(Code)(Java Doc) public Object get(String name, Scriptable start)(Code)(Java Doc) public Object get(int index, Scriptable start)(Code)(Java Doc) public Object[] getAllIds()(Code)(Java Doc) final public Object getAssociatedValue(Object key)(Code)(Java Doc) final public int getAttributes(String name, Scriptable start)(Code)(Java Doc) final public int getAttributes(int index, Scriptable start)(Code)(Java Doc) public int getAttributes(String name)(Code)(Java Doc) public int getAttributes(int index)(Code)(Java Doc) abstract public String getClassName()(Code)(Java Doc) public static Scriptable getClassPrototype(Scriptable scope, String className)(Code)(Java Doc) public Object getDefaultValue(Class typeHint)(Code)(Java Doc) public static Object getDefaultValue(Scriptable object, Class typeHint)(Code)(Java Doc) public static Scriptable getFunctionPrototype(Scriptable scope)(Code)(Java Doc) public Object getGetterOrSetter(String name, int index, boolean isSetter)(Code)(Java Doc) public Object[] getIds()(Code)(Java Doc) Object[] getIds(boolean getAll)(Code)(Java Doc) public static Scriptable getObjectPrototype(Scriptable scope)(Code)(Java Doc) public Scriptable getParentScope()(Code)(Java Doc) public static Object getProperty(Scriptable obj, String name)(Code)(Java Doc) public static Object getProperty(Scriptable obj, int index)(Code)(Java Doc) public static Object[] getPropertyIds(Scriptable obj)(Code)(Java Doc) public Scriptable getPrototype()(Code)(Java Doc) public static Scriptable getTopLevelScope(Scriptable obj)(Code)(Java Doc) public static Object getTopScopeValue(Scriptable scope, Object key)(Code)(Java Doc) public boolean has(String name, Scriptable start)(Code)(Java Doc) public boolean has(int index, Scriptable start)(Code)(Java Doc) public boolean hasInstance(Scriptable instance)(Code)(Java Doc) public static boolean hasProperty(Scriptable obj, String name)(Code)(Java Doc) public static boolean hasProperty(Scriptable obj, int index)(Code)(Java Doc) public boolean isConst(String name)(Code)(Java Doc) protected boolean isGetterOrSetter(String name, int index, boolean setter)(Code)(Java Doc) final public boolean isSealed()(Code)(Java Doc) public void put(String name, Scriptable start, Object value)(Code)(Java Doc) public void put(int index, Scriptable start, Object value)(Code)(Java Doc) public void putConst(String name, Scriptable start, Object value)(Code)(Java Doc) public static void putConstProperty(Scriptable obj, String name, Object value)(Code)(Java Doc) public static void putProperty(Scriptable obj, String name, Object value)(Code)(Java Doc) public static void putProperty(Scriptable obj, int index, Object value)(Code)(Java Doc) public static void redefineProperty(Scriptable obj, String name, boolean isConst)(Code)(Java Doc) public synchronized void sealObject()(Code)(Java Doc) final public void setAttributes(String name, Scriptable start, int attributes)(Code)(Java Doc) public void setAttributes(int index, Scriptable start, int attributes)(Code)(Java Doc) public void setAttributes(String name, int attributes)(Code)(Java Doc) public void setAttributes(int index, int attributes)(Code)(Java Doc) public void setGetterOrSetter(String name, int index, Callable getterOrSeter, boolean isSetter)(Code)(Java Doc) public void setParentScope(Scriptable m)(Code)(Java Doc) public void setPrototype(Scriptable m)(Code)(Java Doc)
|
|
|