Deprecated API

Contents

Deprecated Interfaces

ContextListener
Embeddings that wish to customize newly created Context instances should implement ContextFactory.Listener.

Deprecated Fields

org.mozilla.javascript.Context.FEATURE_PARENT_PROTO_PROPRTIES
In previous releases, this name was given to FEATURE_PARENT_PROTO_PROPERTIES.

Deprecated Methods

org.mozilla.javascript.ClassCache.isInvokerOptimizationEnabled()
The method always returns false.
org.mozilla.javascript.ClassCache.setInvokerOptimizationEnabled(boolean)
The method does nothing.
org.mozilla.javascript.Context.enter(Context)
use ContextFactory.enterContext(Context) instead as this method relies on usage of a static singleton "global" ContextFactory.
org.mozilla.javascript.Context.call(ContextAction)
use ContextFactory.call(ContextAction) instead as this method relies on usage of a static singleton "global" ContextFactory.
org.mozilla.javascript.Context.addContextListener(ContextListener)
org.mozilla.javascript.Context.removeContextListener(ContextListener)
org.mozilla.javascript.Context.compileReader(Scriptable,Reader,String,int,Object)
org.mozilla.javascript.Context.toObject(Object,Scriptable,Class)
org.mozilla.javascript.Context.toType(Object,Class)
org.mozilla.javascript.Context.hasCompileFunctionsWithDynamicScope()
org.mozilla.javascript.Context.setCompileFunctionsWithDynamicScope(boolean)
org.mozilla.javascript.Context.setCachingEnabled(boolean)
org.mozilla.javascript.ContextFactory.enter()
use enterContext() instead
org.mozilla.javascript.ContextFactory.exit()
Use Context.exit() instead.
org.mozilla.javascript.ContextListener.contextEntered(Context)
Rhino runtime never calls the method.
org.mozilla.javascript.ContextListener.contextExited(Context)
Rhino runtime never calls the method.
org.mozilla.javascript.EcmaError.getSourceName()
Use RhinoException.sourceName() from the super class.
org.mozilla.javascript.EcmaError.getLineNumber()
Use RhinoException.lineNumber() from the super class.
org.mozilla.javascript.EcmaError.getColumnNumber()
Use RhinoException.columnNumber() from the super class.
org.mozilla.javascript.EcmaError.getLineSource()
Use RhinoException.lineSource() from the super class.
org.mozilla.javascript.EcmaError.getErrorObject()
Always returns null.
org.mozilla.javascript.EvaluatorException.getSourceName()
Use RhinoException.sourceName() from the super class.
org.mozilla.javascript.EvaluatorException.getLineNumber()
Use RhinoException.lineNumber() from the super class.
org.mozilla.javascript.EvaluatorException.getColumnNumber()
Use RhinoException.columnNumber() from the super class.
org.mozilla.javascript.EvaluatorException.getLineSource()
Use RhinoException.lineSource() from the super class.
org.mozilla.javascript.FunctionObject.convertArg(Context,Scriptable,Object,Class)
Use getTypeTag(Class) and convertArg(Context,Scriptable,Object,int) for type conversion.
org.mozilla.javascript.ImporterTopLevel.importPackage(Context,Scriptable,Object[],Function)
Kept only for compatibility.
org.mozilla.javascript.JavaScriptException.getSourceName()
Use RhinoException.sourceName() from the super class.
org.mozilla.javascript.JavaScriptException.getLineNumber()
Use RhinoException.lineNumber() from the super class.
org.mozilla.javascript.NativeArray.jsGet_length()
Use getLength() instead.
org.mozilla.javascript.NativeFunction.jsGet_name()
org.mozilla.javascript.NativeGlobal.constructError(Context,String,String,Scriptable)
org.mozilla.javascript.NativeGlobal.constructError(Context,String,String,Scriptable,String,int,int,String)
org.mozilla.javascript.NativeJavaObject.wrap(Scriptable,Object,Class)
Use Context.getWrapFactory() together with calling WrapFactory.wrap(Context, Scriptable, Object, Class)
org.mozilla.javascript.NativeJavaObject.coerceType(Class,Object)
as of 1.5 Release 4
org.mozilla.javascript.ScriptableObject.getAttributes(String,Scriptable)
Use getAttributes(String name).
org.mozilla.javascript.ScriptableObject.getAttributes(int,Scriptable)
Use getAttributes(int index).
org.mozilla.javascript.ScriptableObject.setAttributes(String,Scriptable,int)
Use setAttributes(String name, int attributes).
org.mozilla.javascript.ScriptableObject.setAttributes(int,Scriptable,int)
Use setAttributes(int index, int attributes).
org.mozilla.javascript.ScriptRuntime.toObject(Scriptable,Object,Class)
org.mozilla.javascript.ScriptRuntime.toObject(Context,Scriptable,Object,Class)
org.mozilla.javascript.ScriptRuntime.call(Context,Object,Object,Object[],Scriptable)
The method is only present for compatibility.
org.mozilla.javascript.ScriptRuntime.nameIncrDecr(Scriptable,String,int)
The method is only present for compatibility.
org.mozilla.javascript.ScriptRuntime.newObjectLiteral(Object[],Object[],Context,Scriptable)
This method only present for compatibility.
org.mozilla.javascript.SecurityController.execWithDomain(Context,Scriptable,Script,Object)
The application should not override this method and instead override callWithDomain(Object securityDomain, Context cx, Callable callable, Scriptable scope, Scriptable thisObj, Object[] args).
org.mozilla.javascript.WrappedException.unwrap()

Deprecated Constructors

org.mozilla.javascript.Context.Context()
this constructor is deprecated because it creates a dependency on a static singleton context factory.
org.mozilla.javascript.EcmaError.EcmaError(Scriptable,String,int,int,String)
EcmaError error instances should not be constructed explicitly since they are generated by the engine.
org.mozilla.javascript.JavaScriptException.JavaScriptException(Object)
Use WrappedException.WrappedException(Throwable) to report exceptions in Java code.
org.mozilla.javascript.NativeJavaPackage.NativeJavaPackage(String,ClassLoader)
NativeJavaPackage is an internal class, do not use it directly.
org.mozilla.javascript.NativeJavaPackage.NativeJavaPackage(String)
NativeJavaPackage is an internal class, do not use it directly.