harpoon.Backend.Runtime1
Class ObjectBuilder.RootOracle
java.lang.Object
harpoon.Backend.Runtime1.ObjectBuilder.RootOracle
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- ObjectBuilder
public abstract static class ObjectBuilder.RootOracle
- extends Object
- implements Serializable
A RootOracle
allows a transformation to add
fields to java.lang.Object
(or any other
class, really) and provide the initial values for that
field in the various runtime constant objects without
having to directly extend every ObjectInfo
used in this Generic.Runtime
implementation.
The RootOracle
will be consulted for the
value of every field *before* the ObjectInfo
,
allowing an override -- if no override is desired, the
RootOracle.get()
method should return
NOT_A_VALUE
.
- See Also:
- Serialized Form
Field Summary |
static Object |
NOT_A_VALUE
This is the constant value returned which this
oracle doesn't wish to override the given field. |
Method Summary |
abstract Object |
get(HField hf,
Runtime.ObjectBuilder.Info addlinfo)
Returns the override value of the given field hf
(more information about the object in question is
provided by addlinfo ); if this
RootOracle doesn't wish to override this
field, it should return the constant NOT_A_VALUE . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOT_A_VALUE
public static final Object NOT_A_VALUE
- This is the constant value returned which this
oracle doesn't wish to override the given field.
ObjectBuilder.RootOracle
public ObjectBuilder.RootOracle()
get
public abstract Object get(HField hf,
Runtime.ObjectBuilder.Info addlinfo)
- Returns the override value of the given field
hf
(more information about the object in question is
provided by addlinfo
); if this
RootOracle
doesn't wish to override this
field, it should return the constant NOT_A_VALUE
.