org.mozilla.javascript
Interface WrapHandler


public interface WrapHandler

Embeddings that wish to provide their own custom wrappings for Java objects may implement this interface and call Context.setWrapHandler.

See Also:
Context.setWrapHandler(org.mozilla.javascript.WrapHandler)

Method Summary
 java.lang.Object wrap(Scriptable scope, java.lang.Object obj, java.lang.Class staticType)
          Wrap the object.
 

Method Detail

wrap

public java.lang.Object wrap(Scriptable scope,
                             java.lang.Object obj,
                             java.lang.Class staticType)
Wrap the object.

The value returned must be one of

Parameters:
scope - the scope of the executing script
obj - the object to be wrapped
Returns:
the wrapped value.