if (javaObject instanceof IPathElement) {
if (javaObject != null && app.getPrototypeName(javaObject) != null) {
        public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject) {            if (javaObject instanceof IPathElement) {                return getElementWrapper(javaObject);            }            return super.wrapAsJavaObject(cx, scope, javaObject);        }