01: /*
02: * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
03: * Copyright (C) 2006 - Javolution (http://javolution.org/)
04: * All rights reserved.
05: *
06: * Permission to use, copy, modify, and distribute this software is
07: * freely granted, provided that this notice is preserved.
08: */
09: package javolution.lang;
10:
11: /**
12: * <p> This interface represents an object reference, the reachability level
13: * of a reference varies based on the actual reference implementation.
14: * Here are the reachability levels for some of <i><b>J</b>avolution</i>
15: * references:<ul>
16: * <li> {@link javolution.context.PersistentContext.Reference PersistentContext.Reference} :
17: * Reachable accross multiple program executions.</li>
18: * <li> {@link javolution.context.LocalContext.Reference LocalContext.Reference} :
19: * Reachable only within the scope of the
20: * {@link javolution.context.LocalContext LocalContext}
21: * where it has been set.</li>
22: * <li> {@link javolution.context.AllocatorContext.Reference AllocatorContext.Reference} :
23: * Reachable only within the scope of the
24: * {@link javolution.context.AllocatorContext Allocator}
25: * where it has been created (factory produced).</li>
26: * </ul></p>
27: *
28: * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
29: * @version 3.3, May 10, 2005
30: */
31: public interface Reference/*<T>*/{
32:
33: /**
34: * Returns the value this reference referes to.
35: *
36: * @return the referent or <code>null</code> if not set.
37: */
38: Object/*{T}*/get();
39:
40: /**
41: * Sets the value this reference referes to.
42: *
43: * @param value the reference value.
44: */
45: void set(Object/*{T}*/value);
46:
47: }
|