|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Backend.Generic.Runtime.ObjectBuilder | +--harpoon.Backend.Runtime1.ObjectBuilder
ObjectBuilder
is an implementation of
harpoon.Backend.Generic.Runtime.ObjectBuilder
for the
Runtime1
runtime.
To accomodate transformations which add fields to
java.lang.Object
, this
Runtime.ObjectBuilder
initializes all fields of
Object
with null
, rather than attempting
to consult the given Info
for them. If other behavior
is eventually needed, it is a custom RootOracle
be
defined and provided to the constructor which will be consulted on
the value of every field *before* any Info
.
This provides for extensibility without direct code modifications
to the various parts of Runtime1
which use this
ObjectBuilder
.
Nested Class Summary | |
static class |
ObjectBuilder.RootOracle
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. |
Nested classes inherited from class harpoon.Backend.Generic.Runtime.ObjectBuilder |
Runtime.ObjectBuilder.ArrayInfo, Runtime.ObjectBuilder.Info, Runtime.ObjectBuilder.ObjectInfo |
Constructor Summary | |
ObjectBuilder(Runtime runtime)
Creates a ObjectBuilder with a RootOracle
which supplies null values to any field of
java.lang.Object (which there usually aren't any of). |
|
ObjectBuilder(Runtime runtime,
ObjectBuilder.RootOracle ro)
Creates a ObjectBuilder . |
Method Summary | |
Stm |
buildArray(TreeFactory tf,
Runtime.ObjectBuilder.ArrayInfo info,
boolean exported)
Build an array. |
Stm |
buildObject(TreeFactory tf,
Runtime.ObjectBuilder.ObjectInfo info,
boolean exported)
Build an object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ObjectBuilder(Runtime runtime)
ObjectBuilder
with a RootOracle
which supplies null
values to any field of
java.lang.Object
(which there usually aren't any of).
public ObjectBuilder(Runtime runtime, ObjectBuilder.RootOracle ro)
ObjectBuilder
.
Method Detail |
public Stm buildObject(TreeFactory tf, Runtime.ObjectBuilder.ObjectInfo info, boolean exported)
Runtime.ObjectBuilder
buildObject
in class Runtime.ObjectBuilder
info
- Information about the type and contents of
the object to build.exported
- true
if this object's label
is to be exported outside its module.public Stm buildArray(TreeFactory tf, Runtime.ObjectBuilder.ArrayInfo info, boolean exported)
Runtime.ObjectBuilder
buildArray
in class Runtime.ObjectBuilder
info
- Information about the type, length and contents of
the array to build.exported
- true
if this object's label
is to be exported outside its module.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |