Debian Codegraph @

rhino/src/org/mozilla/javascript/Ref.java

raw symbols SCIP
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 package org.mozilla.javascript;
8
9 import java.io.Serializable;
10
11 /**
12 * Generic notion of reference object that know how to query/modify the
13 * target objects based on some property/index.
14 */
15 public abstract class Ref implements Serializable
16 {
17
18 static final long serialVersionUID = 4044540354730911424L;
19
20 public boolean has(Context cx)
21 {
22 return true;
23 }
24
25 public abstract Object get(Context cx);
26
27 /**
28 * @deprecated Use {@link #set(Context, Scriptable, Object)} instead
29 */
30 @Deprecated
31 public abstract Object set(Context cx, Object value);
32
33 public Object set(Context cx, Scriptable scope, Object value)
34 {
35 return set(cx, value);
36 }
37
38 public boolean delete(Context cx)
39 {
40 return false;
41 }
42
43 }
44