Overview | Class | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

## Deprecated API

Deprecated Interfaces
org.mozilla.javascript.ClassOutput To store generated bytecode implement `ClassRepository` instead.
org.mozilla.javascript.SecuritySupport Since Rhino 1.5 R4 this interface is split into `ClassShutter` interface with the single `ClassShutter.visibleToScripts(String fullClassName)` method and the abstract `SecurityController` class to implement domain-based security restrictions. For binary compatibility with older code implementing SecuritySupport only to restrict class access via the visibleToScripts method, this interface extends `ClassShutter`, so to upgrade you code in this case simply replace SecuritySupport by ClassShutter and remove empty implementation of the defineClass, getClassContext and getSecurityDomain methods. Then call `Context.setClassShutter(ClassShutter)` in place of`Context.setSecuritySupport(SecuritySupport)`. The new `SecurityController` is incompatible with the old security implementation, so if you previously had non-trivial implementation of the defineClass, getClassContext and getSecurityDomain methods, you need to upgrade you code to use the new `SecurityController`.
org.mozilla.javascript.WrapHandler As of Rhino 1.5 Release 4, use `WrapFactory`. Note that when extending `WrapFactory` you should call `super.wrap(...)` instead of returning null to get default behavior. You should also take into account that `WrapFactory.wrap(Context cx, Scriptable scope, Object obj, Class cls)` can be called when `obj == null`

Deprecated Methods
org.mozilla.javascript.Context.getClassName() Use `ClassNameHelper.get(cx).getClassName()` instead.
org.mozilla.javascript.Context.getClassOutput() Use `ClassNameHelper.get(cx).getClassOutput()` instead.
org.mozilla.javascript.Context.getClassRepository() Use `ClassNameHelper.get(cx).getClassRepository()` instead.
org.mozilla.javascript.ClassOutput.getOutputStream(String, boolean)
org.mozilla.javascript.Context.getTargetClassFileName() Use `ClassNameHelper.get(cx).getTargetClassFileName()` instead.
org.mozilla.javascript.Context.getTargetPackage() Use `ClassNameHelper.get(cx).getTargetPackage()` instead.
org.mozilla.javascript.Context.getWrapHandler() As of Rhino 1.5 Release 4, use `WrapFactory` and `Context.getWrapFactory()`
org.mozilla.javascript.Context.setClassName(String) Use `ClassNameHelper.get(cx).setClassName(className)` instead.
org.mozilla.javascript.Context.setClassOutput(ClassOutput) Use `ClassNameHelper.get(cx).setClassOutput(classOutput)` instead.
org.mozilla.javascript.Context.setClassRepository(ClassRepository) Use `ClassNameHelper.get(cx).setClassRepository(classRepository)` instead.
org.mozilla.javascript.Context.setSecuritySupport(SecuritySupport) The `SecuritySupport` class is deprecated. See its documentation for the upgrade path.
org.mozilla.javascript.Context.setTargetClassFileName(String) Use `ClassNameHelper.get(cx).setTargetClassFileName(classFileName)` instead.
org.mozilla.javascript.Context.setTargetExtends(Class) Use `ClassNameHelper.get(cx).setTargetExtends(extendsClass)` instead.
org.mozilla.javascript.Context.setTargetImplements(Class[]) Use `ClassNameHelper.get(cx).setTargetImplements(implementsClasses)` instead.
org.mozilla.javascript.Context.setTargetPackage(String) Use `ClassNameHelper.get(cx).setTargetPackage(targetPackage)` instead.
org.mozilla.javascript.Context.setWrapHandler(WrapHandler) As of Rhino 1.5 Release 4, use `WrapFactory` and `Context.setWrapFactory(WrapFactory)`

Deprecated Constructors
org.mozilla.javascript.Context(SecuritySupport) The `SecuritySupport` class is deprecated. See its documentation for the upgrade path.
org.mozilla.javascript.ImporterTopLevel()

Overview | Class | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES