/** * @deprecated * @see #toObject(Object, Scriptable) */ public static Scriptable toObject(Object value, Scriptable scope, Class<?> staticType) { return ScriptRuntime.toObject(scope, value); }
/** * @deprecated * @see #toObject(Object, Scriptable) */ public static Scriptable toObject(Object value, Scriptable scope, Class<?> staticType) { return ScriptRuntime.toObject(scope, value); }
/** * @param scope the scope that should be used to resolve primitive prototype */ public static Scriptable toObjectOrNull(Context cx, Object obj, final Scriptable scope) { if (obj instanceof Scriptable) { return (Scriptable)obj; } else if (obj != null && obj != Undefined.instance) { return toObject(cx, scope, obj); } return null; }
/** * @deprecated * @see #toObject(Object, Scriptable) */ public static Scriptable toObject(Object value, Scriptable scope, Class<?> staticType) { return ScriptRuntime.toObject(scope, value); }
/** * @deprecated Use {@link #toObject(Context, Scriptable, Object)} instead. */ public static Scriptable toObject(Context cx, Scriptable scope, Object val, Class<?> staticClass) { return toObject(cx, scope, val); }
/** * @param scope the scope that should be used to resolve primitive prototype */ public static Scriptable toObjectOrNull(Context cx, Object obj, final Scriptable scope) { if (obj instanceof Scriptable) { return (Scriptable)obj; } else if (obj != null && obj != Undefined.instance) { return toObject(cx, scope, obj); } return null; }
/** * @deprecated Use {@link #toObject(Context, Scriptable, Object)} instead. */ @Deprecated public static Scriptable toObject(Context cx, Scriptable scope, Object val, Class<?> staticClass) { return toObject(cx, scope, val); }
/** * @deprecated * @see #toObject(Object, Scriptable) */ @Deprecated public static Scriptable toObject(Object value, Scriptable scope, Class<?> staticType) { return ScriptRuntime.toObject(scope, value); }
public Object jsFunction_addNode(String path, String primaryType) throws RepositoryException { Node n = null; if(primaryType == null || "undefined".equals(primaryType)) { n = node.addNode(path); } else { n = node.addNode(path, primaryType); } final Object result = ScriptRuntime.toObject(this, n); return result; }
/** * @deprecated Use {@link #toObject(Scriptable, Object)} instead. */ @Deprecated public static Scriptable toObject(Scriptable scope, Object val, Class<?> staticClass) { if (val instanceof Scriptable) { return (Scriptable)val; } return toObject(Context.getContext(), scope, val); }
public Object jsGet_parent() { try { return ScriptRuntime.toObject(this, property.getParent()); } catch (RepositoryException re) { return Undefined.instance; } }
/** * @deprecated Use {@link #toObject(Scriptable, Object)} instead. */ public static Scriptable toObject(Scriptable scope, Object val, Class<?> staticClass) { if (val instanceof Scriptable) { return (Scriptable)val; } return toObject(Context.getContext(), scope, val); }
public static Scriptable toObject(Scriptable scope, Object val) { if (val instanceof Scriptable) { return (Scriptable)val; } return toObject(Context.getContext(), scope, val); }
/** * Warning: this doesn't allow to resolve primitive prototype properly when many top scopes are involved */ public static Scriptable toObjectOrNull(Context cx, Object obj) { if (obj instanceof Scriptable) { return (Scriptable)obj; } else if (obj != null && obj != Undefined.instance) { return toObject(cx, getTopCallScope(cx), obj); } return null; }
public static Scriptable toObject(Scriptable scope, Object val) { if (val instanceof Scriptable) { return (Scriptable)val; } return toObject(Context.getContext(), scope, val); }
/** * Warning: this doesn't allow to resolve primitive prototype properly when many top scopes are involved */ public static Scriptable toObjectOrNull(Context cx, Object obj) { if (obj instanceof Scriptable) { return (Scriptable)obj; } else if (obj != null && obj != Undefined.instance) { return toObject(cx, getTopCallScope(cx), obj); } return null; }
public Object jsGet_node() { try { return ScriptRuntime.toObject(this, property.getValue()); } catch (RepositoryException re) { return Undefined.instance; } }
static Object newWithSpecial(Context cx, Scriptable scope, Object[] args) { ScriptRuntime.checkDeprecated(cx, "With"); scope = ScriptableObject.getTopLevelScope(scope); NativeWith thisObj = new NativeWith(); thisObj.setPrototype(args.length == 0 ? ScriptableObject.getClassPrototype(scope, "Object") : ScriptRuntime.toObject(cx, scope, args[0])); thisObj.setParentScope(scope); return thisObj; }
static Object newWithSpecial(Context cx, Scriptable scope, Object[] args) { ScriptRuntime.checkDeprecated(cx, "With"); scope = ScriptableObject.getTopLevelScope(scope); NativeWith thisObj = new NativeWith(); thisObj.setPrototype(args.length == 0 ? ScriptableObject.getObjectPrototype(scope) : ScriptRuntime.toObject(cx, scope, args[0])); thisObj.setParentScope(scope); return thisObj; }
static Object newWithSpecial(Context cx, Scriptable scope, Object[] args) { ScriptRuntime.checkDeprecated(cx, "With"); scope = ScriptableObject.getTopLevelScope(scope); NativeWith thisObj = new NativeWith(); thisObj.setPrototype(args.length == 0 ? ScriptableObject.getObjectPrototype(scope) : ScriptRuntime.toObject(cx, scope, args[0])); thisObj.setParentScope(scope); return thisObj; }