harpoon.ClassFile
Class HCodeAndMaps<HCE extends HCodeElement>

java.lang.Object
  extended by harpoon.ClassFile.HCodeAndMaps<HCE>

public class HCodeAndMaps<HCE extends HCodeElement>
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.4 2003/07/11 09:41:28 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
HCodeAndMaps(HCode<HCE> hcode, Map<HCE,HCE> elementMap, TempMap tempMap, HCode<HCE> ancestorHCode, Map<HCE,HCE> ancestorElementMap, TempMap ancestorTempMap)
          constructor.
 
Method Summary
 Map<HCE,HCE> ancestorElementMap()
          An immutable mapping from newly-cloned HCodeElements to ancestor HCodeElements.
 HCode<HCE> 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<HCE,HCE> elementMap()
          An immutable mapping from ancestor HCodeElements to newly-cloned HCodeElements.
 HCode<HCE> 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<HCE> hcode,
                    Map<HCE,HCE> elementMap,
                    TempMap tempMap,
                    HCode<HCE> ancestorHCode,
                    Map<HCE,HCE> ancestorElementMap,
                    TempMap ancestorTempMap)
constructor.

Method Detail

hcode

public HCode<HCE> hcode()
Returns the newly-cloned HCode.


elementMap

public Map<HCE,HCE> 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<HCE> ancestorHCode()
Returns the original HCode that the clone returned by the hcode() method was copied from.


ancestorElementMap

public Map<HCE,HCE> 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.