jif.types

## Class PathMap

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<Path,Label>` | `map`
    `protected JifTypeSystem` | `ts`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PathMap(JifTypeSystem ts)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<Path>` | `allPaths()` Return all paths in the map including NV.
    `void` | `dump(polyglot.util.CodeWriter w)`
    `PathMap` | `exc(Label label, polyglot.types.Type type)`
    `PathMap` | `exception(polyglot.types.Type type, Label label)`
    `Label` | `get(Path p)`
    `PathMap` | `join(PathMap m)`
    `Label` | `N()`
    `PathMap` | `N(Label label)`
    `Label` | `NV()` Normal value label
    `PathMap` | `NV(Label label)`
    `java.util.Set<Path>` | `paths()` Return all paths in the map except NV (which isn't really a path).
    `Label` | `R()`
    `PathMap` | `R(Label label)`
    `PathMap` | `set(Path p, Label L)`
    `boolean` | `singlePath()` Returns true if there's only one "path" through the method or constructor according to this PathMap
    `PathMap` | `subst(LabelSubstitution subst)`
    `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<Path,Label> 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()

      Normal value label

    - #### NV

          public PathMap NV(Label label)

    - #### R

          public Label R()

    - #### R

          public PathMap R(Label label)

    - #### exception

          public PathMap exception(polyglot.types.Type type,
                                   Label label)

    - #### exc

          public PathMap exc(Label label,
                             polyglot.types.Type type)

    - #### paths

          public java.util.Set<Path> paths()

      Return all paths in the map except NV (which isn't really a path).

    - #### allPaths

          public java.util.Set<Path> allPaths()

      Return all paths in the map including NV.

    - #### join

          public PathMap join(PathMap m)

    - #### subst

          public PathMap subst(LabelSubstitution subst)
                        throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### subst

          public PathMap subst(VarMap bounds)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### dump

          public void dump(polyglot.util.CodeWriter w)

    - #### singlePath

          public boolean singlePath()

      Returns true if there's only one "path" through the method or constructor according to this PathMap