harpoon.ClassFile
Class HCodeAndMaps

java.lang.Object
  |
  +--harpoon.ClassFile.HCodeAndMaps

public final class HCodeAndMaps
extends Object

HCodeAndMaps is a strongly-typed tuple representing all the derivation information for a cloned HCode. This includes the mappings from old HCodeElements and Temps to new HCodeElements and Temps as well as the identity of both the old HCode and newly cloned HCode. It is intended to make 'clone-then-mutate' operations more straight-forward to write.

Version:
$Id: HCodeAndMaps.java,v 1.2 2002/02/25 21:03:03 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
HCodeAndMaps(HCode hcode, Map elementMap, TempMap tempMap, HCode ancestorHCode, Map ancestorElementMap, TempMap ancestorTempMap)
          constructor.
 
Method Summary
 Map ancestorElementMap()
          An immutable mapping from newly-cloned HCodeElements to ancestor HCodeElements.
 HCode ancestorHCode()
          Returns the original HCode that the clone returned by the hcode() method was copied from.
 TempMap ancestorTempMap()
          An immutable mapping from newly-cloned Temps to ancestor Temps.
 Map elementMap()
          An immutable mapping from ancestor HCodeElements to newly-cloned HCodeElements.
 HCode hcode()
          Returns the newly-cloned HCode.
 TempMap tempMap()
          An immutable mapping from ancestor Temps to newly-cloned Temps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HCodeAndMaps

public HCodeAndMaps(HCode hcode,
                    Map elementMap,
                    TempMap tempMap,
                    HCode ancestorHCode,
                    Map ancestorElementMap,
                    TempMap ancestorTempMap)
constructor.

Method Detail

hcode

public HCode hcode()
Returns the newly-cloned HCode.


elementMap

public Map elementMap()
An immutable mapping from ancestor HCodeElements to newly-cloned HCodeElements.


tempMap

public TempMap tempMap()
An immutable mapping from ancestor Temps to newly-cloned Temps.


ancestorHCode

public HCode ancestorHCode()
Returns the original HCode that the clone returned by the hcode() method was copied from.


ancestorElementMap

public Map ancestorElementMap()
An immutable mapping from newly-cloned HCodeElements to ancestor HCodeElements.


ancestorTempMap

public TempMap ancestorTempMap()
An immutable mapping from newly-cloned Temps to ancestor Temps.