01: package argparser;
02:
03: /**
04: * Wrapper class which ``holds'' an Object reference,
05: * enabling methods to return Object references through
06: * arguments.
07: */
08: public class ObjectHolder implements java.io.Serializable {
09: /**
10: * Value of the Object reference, set and examined
11: * by the application as needed.
12: */
13: public Object value;
14:
15: /**
16: * Constructs a new <code>ObjectHolder</code> with an initial
17: * value of <code>null</code>.
18: */
19: public ObjectHolder() {
20: value = null;
21: }
22:
23: /**
24: * Constructs a new <code>ObjectHolder</code> with a
25: * specific initial value.
26: *
27: * @param o Initial Object reference.
28: */
29: public ObjectHolder(Object o) {
30: value = o;
31: }
32: }
|