Override wrapAsJavaObject in wrapper factory to check for IPathElement objects.

This commit is contained in:
hns 2003-06-23 15:58:25 +00:00
parent 3c1c5b47b8
commit ec1aed6650

View file

@ -749,10 +749,13 @@ public final class RhinoCore {
return super.wrap(cx, scope, obj, staticType);
}
/* public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject) {
System.err.println ("J-Wrapping: "+javaObject);
public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject) {
if (javaObject instanceof IPathElement) {
return getElementWrapper(javaObject);
}
return super.wrapAsJavaObject(cx, scope, javaObject);
} */
}
public Scriptable wrapNewObject(Context cx, Scriptable scope, Object obj) {
// System.err.println ("N-Wrapping: "+obj);