Check out the new USENIX Web site. next up previous
Next: Java Call Stack Up: System Components and Implementation Previous: Metadata and Method Dispatch

Object Manipulation


Java objects are manipulated through three interfaces: Object, which encapsulates field layout and access; ObjectSource, which encapsulates object allocation and garbage collection; and Field, described above, which encapsulates the data required to locate a field within an object.

 

These interfaces are implemented as shown in Figure 8, which has similarities to the method dispatch structures shown earlier in Figure 7. The Field abstraction serves an analogous purpose to MethodDecl, representing a field reference in the constant pool. The Field is then passed to the Object, which returns the value of that field.


  
Figure 8: The Jupiter objects responsible for the layout of Java objects.
\includegraphics[scale=0.85]{object-layout-objects.ps}



Tarek S. Abdelrahman
2002-05-27