jltools.ext.jif.types
Class PathMap

java.lang.Object
  |
  +--jltools.ext.jif.types.PathMap

public class PathMap
extends java.lang.Object

Implements the mapping from paths to labels. All updates are functional, so that old path maps are still accessible. This means that all updates, etc. create clones of the pathmap. There may be a more efficient way to do this sharing, with "lazy" copying of the necessary entries, but this is easy to implement.


Field Summary
protected  java.util.Map map
           
protected  JifTypeSystem ts
           
 
Constructor Summary
PathMap(JifTypeSystem ts)
           
 
Method Summary
 java.util.Set allPaths()
          Return all paths in the map including NV and RV.
 void dump(CodeWriter w)
           
 PathMap exc(Label label, Type type)
           
 Label exception(Type type)
           
 PathMap exception(Type type, Label label)
           
 Label get(Path p)
           
 PathMap join(PathMap m)
           
 Label N()
           
 PathMap N(Label label)
           
 Label NV()
           
 PathMap NV(Label label)
           
 java.util.Set paths()
          Return all paths in the map except NV and RV (which aren't really paths).
 Label R()
           
 PathMap R(Label label)
           
 Label RV()
           
 PathMap RV(Label label)
           
 PathMap set(Path p, Label L)
           
 PathMap subst(VarMap bounds)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

protected java.util.Map map

ts

protected JifTypeSystem ts
Constructor Detail

PathMap

public PathMap(JifTypeSystem ts)
Method Detail

get

public Label get(Path p)

set

public PathMap set(Path p,
                   Label L)

N

public Label N()

N

public PathMap N(Label label)

NV

public Label NV()

NV

public PathMap NV(Label label)

R

public Label R()

R

public PathMap R(Label label)

RV

public Label RV()

RV

public PathMap RV(Label label)

exception

public Label exception(Type type)

exception

public PathMap exception(Type type,
                         Label label)

exc

public PathMap exc(Label label,
                   Type type)

paths

public java.util.Set paths()
Return all paths in the map except NV and RV (which aren't really paths).

allPaths

public java.util.Set allPaths()
Return all paths in the map including NV and RV.

join

public PathMap join(PathMap m)

subst

public PathMap subst(VarMap bounds)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dump

public void dump(CodeWriter w)