Source code: com/tripi/asp/ByRefValue.java
1 /**
2 * ArrowHead ASP Server
3 * This is a source file for the ArrowHead ASP Server - an 100% Java
4 * VBScript interpreter and ASP server.
5 *
6 * For more information, see http://www.tripi.com/arrowhead
7 *
8 * Copyright (C) 2002 Terence Haddock
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 */
25 package com.tripi.asp;
26
27 /**
28 * This class contains a reference to an object which is being passed
29 * by reference. Useful in ASP to Java calls where the object is passed
30 * by reference instead of by value.
31 *
32 * @author Terence Haddock
33 */
34 public class ByRefValue
35 {
36 /** The sub-object this class contains. */
37 Object subObject;
38
39 /**
40 * Constructor.
41 */
42 public ByRefValue()
43 {
44 };
45
46 /**
47 * Constructor, with initial object.
48 * @param subObject sub-object this class contains.
49 */
50 public ByRefValue(Object subObject)
51 {
52 this.subObject = subObject;
53 }
54
55 /**
56 * Obtains this object's value.
57 */
58 public Object getValue()
59 {
60 return subObject;
61 }
62
63 /**
64 * Set this object's value.
65 */
66 public void setValue(Object subObject)
67 {
68 this.subObject = subObject;
69 }
70 }
71