Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jif.types
Class VarMap

    java.lang.Object
      jif.types.VarMap

    public class VarMap

extends java.lang.Object

Maps variable components to labels. Whether these labels are interpreted as upper bounds, lower bounds, or just labels depends on the use of the VarMap. If a variable v is in the map when boundOf(v) is called, boundOf(v) will return the label defaultBound, and enter the mapping v->defaultBound into the map, so that next time boundOf(v) is called, the same label will be returned, even if the default bound has changed in the meantime, through the setDefaultBound(Label) method. The defaultLabel defaults to ts.topLabel().

Field Summary
`protected java.util.Map` | `bounds`
`protected Label` | `defaultLabelBound`
`protected Principal` | `defaultPrincipalBound`
`protected JifTypeSystem` | `ts`

Constructor Summary
`VarMap(JifTypeSystem ts, Label defaultLabelBound, Principal defaultPrincipalBound)`

Method Summary
`Label` | `applyTo(Label c)`
`Param` | `applyTo(Param c)`
`Policy` | `applyTo(Policy p)`
`Principal` | `applyTo(Principal p)`
`polyglot.types.Type` | `applyTo(polyglot.types.Type t)`
`Label` | `boundOf(VarLabel v)`
`Principal` | `boundOf(VarPrincipal v)`
`VarMap` | `copy()`
`void` | `dump(polyglot.util.CodeWriter w)`
`void` | `setBound(Variable v, Label bound)`
`void` | `setBound(Variable v, Principal bound)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### bounds

    protected java.util.Map bounds

### ts

    protected JifTypeSystem ts

### defaultLabelBound

    protected final Label defaultLabelBound

### defaultPrincipalBound

    protected final Principal defaultPrincipalBound

Constructor Detail

### VarMap

    public VarMap(JifTypeSystem ts,
                  Label defaultLabelBound,
                  Principal defaultPrincipalBound)

Method Detail

### copy

    public VarMap copy()

### boundOf

    public Principal boundOf(VarPrincipal v)

### boundOf

    public Label boundOf(VarLabel v)

### setBound

    public void setBound(Variable v,
                         Label bound)

### setBound

    public void setBound(Variable v,
                         Principal bound)

### applyTo

    public Policy applyTo(Policy p)

### applyTo

    public Param applyTo(Param c)

### applyTo

    public Label applyTo(Label c)

### applyTo

    public Principal applyTo(Principal p)

### applyTo

    public polyglot.types.Type applyTo(polyglot.types.Type t)

### toString

    public java.lang.String toString()

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

### dump

    public void dump(polyglot.util.CodeWriter w)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD