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 JifContext_c

    java.lang.Object
      polyglot.ext.jl.types.Context_c
          jif.types.JifContext_c

All Implemented Interfaces:
  java.lang.Cloneable, JifContext, polyglot.types.Context, polyglot.types.Resolver, polyglot.util.Copy

    public class JifContext_c

extends polyglot.ext.jl.types.Context_c
implements JifContext

An implementation of the `JifContext` interface.

Nested Class Summary

Nested classes/interfaces inherited from class polyglot.ext.jl.types.Context_c
`polyglot.ext.jl.types.Context_c.Kind`

Field Summary

Fields inherited from class polyglot.ext.jl.types.Context_c
`BLOCK, CLASS, code, CODE, inCode, it, kind, outer, OUTER, scope, SOURCE, staticContext, ts, type, types, vars`

Method Summary
`boolean` | `actsFor(java.util.Collection actorGrp, java.util.Collection grantorGrp)` Test an actsfor relation, using the principal hierarchy.
`boolean` | `actsFor(Principal p1, Principal p2)` Test an actsfor relation, using the principal hierarchy.
`void` | `addActsFor(Principal p1, Principal p2)` Add an actsfor relation to the principal hierarchy.
`void` | `addAssertionLE(Label L1, Label L2)` Add a less than or equal assertion to the label environment.
`void` | `addDefinitionalAssertionEquiv(Label L1, Label L2)` Adds the assertion to this context, and all outer contexts up to the method/constructor/initializer level
`void` | `addDefinitionalEquiv(Principal p1, Principal p2)` Adds the assertion to this context, and all outer contexts up to the method/constructor/initializer level
`void` | `addEquiv(Principal p1, Principal p2)` Add an actsfor relation both ways to the principal hierarchy.
`Label` | `authLabel()` Get the authority of the current code, represented as a privacy label.
`java.util.Set` | `authority()` The authority of a class or a procedure is the set of principals who have authorized that code.
`boolean` | `checkingInits()` Indicates if we are currently checking the initializers within a constructor.
`void` | `clearPH()` Clears the principal hierarchy of all actsfor relations.
`Label` | `constructorReturnLabel()` If the current code is a constructor, returns the return label of that constructor.
`java.lang.Object` | `copy()`
`Label` | `entryPC()` The entry PC is the upper bound on the PC of the caller of the current code.
`boolean` | `equiv(Principal p1, Principal p2)` Test if p1 actsfor p2 and vice versa, using the principal hierarchy.
`polyglot.types.VarInstance` | `findVariableSilent(java.lang.String name)`
`Label` | `gotoLabel(polyglot.ast.Branch.Kind kind, java.lang.String label)` Retrieve the `Label` associated with branching to the location `label`, with the branch kind `kind`.
`void` | `gotoLabel(polyglot.ast.Branch.Kind kind, java.lang.String label, Label L)` Record the `Label` associated with branching to the location `label`, with the branch kind `kind`.
`boolean` | `inConstructorCall()` Is the Context in a constructor call, e.g.
`LabelEnv` | `labelEnv()`
`Label` | `pc()`
`PrincipalHierarchy` | `ph()`
`polyglot.types.Context` | `pushConstructorCall()` Push a Context onto the stack for a constructor call, e.g.
`void` | `setAuthority(java.util.Set auth)`
`void` | `setCheckingInits(boolean checkingInits)` Set whether we are currently checking the initializers within a constructor.
`void` | `setConstructorReturnLabel(Label Lr)`
`void` | `setEntryPC(Label entryPC)`
`void` | `setPc(Label pc)`

Methods inherited from class polyglot.ext.jl.types.Context_c
`addMethod, addNamed, addNamedToThisScope, addVariable, addVariableToThisScope, currentClass, currentClassScope, currentCode, find, findField, findFieldScope, findInThisScope, findLocal, findMethod, findMethodContainerInThisScope, findMethodScope, findVariable, findVariableInThisScope, importTable, inCode, inStaticContext, isBlock, isClass, isCode, isLocal, isOuter, isSource, mapsToString, outerResolver, package_, pop, push, pushBlock, pushClass, pushCode, pushSource, pushStatic, toString, typeSystem`

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

Methods inherited from interface polyglot.types.Context
`addMethod, addNamed, addVariable, currentClass, currentClassScope, currentCode, findField, findFieldScope, findLocal, findMethod, findMethodScope, findVariable, importTable, inCode, inStaticContext, isLocal, outerResolver, package_, pop, pushBlock, pushClass, pushCode, pushSource, pushStatic, typeSystem`

Methods inherited from interface polyglot.types.Resolver
`find`

Method Detail

### copy

    public java.lang.Object copy()

  Specified by:
    `copy` in interface `polyglot.util.Copy`
  Overrides:
    `copy` in class `polyglot.ext.jl.types.Context_c`

### findVariableSilent

    public polyglot.types.VarInstance findVariableSilent(java.lang.String name)

  Specified by:
    `findVariableSilent` in interface `polyglot.types.Context`
  Overrides:
    `findVariableSilent` in class `polyglot.ext.jl.types.Context_c`

### labelEnv

    public LabelEnv labelEnv()

  Specified by:
    `labelEnv` in interface `JifContext`

### addAssertionLE

    public void addAssertionLE(Label L1,
                               Label L2)

  Description copied from interface: `JifContext`
  Add a less than or equal assertion to the label environment.

  Specified by:
    `addAssertionLE` in interface `JifContext`

### addDefinitionalAssertionEquiv

    public void addDefinitionalAssertionEquiv(Label L1,
                                              Label L2)

  Adds the assertion to this context, and all outer contexts up to the method/constructor/initializer level

  Specified by:
    `addDefinitionalAssertionEquiv` in interface `JifContext`
  Parameters:
    `L1` -
    `L2` -

### addEquiv

    public void addEquiv(Principal p1,
                         Principal p2)

  Description copied from interface: `JifContext`
  Add an actsfor relation both ways to the principal hierarchy.

  Specified by:
    `addEquiv` in interface `JifContext`

### addActsFor

    public void addActsFor(Principal p1,
                           Principal p2)

  Description copied from interface: `JifContext`
  Add an actsfor relation to the principal hierarchy.

  Specified by:
    `addActsFor` in interface `JifContext`

### addDefinitionalEquiv

    public void addDefinitionalEquiv(Principal p1,
                                     Principal p2)

  Adds the assertion to this context, and all outer contexts up to the method/constructor/initializer level

  Specified by:
    `addDefinitionalEquiv` in interface `JifContext`

### actsFor

    public boolean actsFor(Principal p1,
                           Principal p2)

  Description copied from interface: `JifContext`
  Test an actsfor relation, using the principal hierarchy.

  Specified by:
    `actsFor` in interface `JifContext`

### equiv

    public boolean equiv(Principal p1,
                         Principal p2)

  Description copied from interface: `JifContext`
  Test if p1 actsfor p2 and vice versa, using the principal hierarchy.

  Specified by:
    `equiv` in interface `JifContext`

### actsFor

    public boolean actsFor(java.util.Collection actorGrp,
                           java.util.Collection grantorGrp)

  Description copied from interface: `JifContext`
  Test an actsfor relation, using the principal hierarchy.

  Specified by:
    `actsFor` in interface `JifContext`

### clearPH

    public void clearPH()

  Description copied from interface: `JifContext`
  Clears the principal hierarchy of all actsfor relations.

  Specified by:
    `clearPH` in interface `JifContext`

### gotoLabel

    public Label gotoLabel(polyglot.ast.Branch.Kind kind,
                           java.lang.String label)

  Description copied from interface: `JifContext`
  Retrieve the `Label` associated with branching to the location `label`, with the branch kind `kind`.

  Specified by:
    `gotoLabel` in interface `JifContext`

### gotoLabel

    public void gotoLabel(polyglot.ast.Branch.Kind kind,
                          java.lang.String label,
                          Label L)

  Description copied from interface: `JifContext`
  Record the `Label` associated with branching to the location `label`, with the branch kind `kind`.

  Specified by:
    `gotoLabel` in interface `JifContext`

### entryPC

    public Label entryPC()

  Description copied from interface: `JifContext`
  The entry PC is the upper bound on the PC of the caller of the current code.

  Specified by:
    `entryPC` in interface `JifContext`

### setEntryPC

    public void setEntryPC(Label entryPC)

  Specified by:
    `setEntryPC` in interface `JifContext`

### pc

    public Label pc()

  Specified by:
    `pc` in interface `JifContext`

### setPc

    public void setPc(Label pc)

  Specified by:
    `setPc` in interface `JifContext`

### authority

    public java.util.Set authority()

  Description copied from interface: `JifContext`
  The authority of a class or a procedure is the set of principals who have authorized that code.

  Specified by:
    `authority` in interface `JifContext`

### setAuthority

    public void setAuthority(java.util.Set auth)

  Specified by:
    `setAuthority` in interface `JifContext`

### ph

    public PrincipalHierarchy ph()

  Specified by:
    `ph` in interface `JifContext`

### authLabel

    public Label authLabel()

  Description copied from interface: `JifContext`
  Get the authority of the current code, represented as a privacy label.

  Specified by:
    `authLabel` in interface `JifContext`

### checkingInits

    public boolean checkingInits()

  Description copied from interface: `JifContext`
  Indicates if we are currently checking the initializers within a constructor. If we are, then more permissive label checking can be used for field assignments.

  Specified by:
    `checkingInits` in interface `JifContext`

### setCheckingInits

    public void setCheckingInits(boolean checkingInits)

  Description copied from interface: `JifContext`
  Set whether we are currently checking the initializers within a constructor.

  Specified by:
    `setCheckingInits` in interface `JifContext`

### constructorReturnLabel

    public Label constructorReturnLabel()

  Description copied from interface: `JifContext`
  If the current code is a constructor, returns the return label of that constructor. The value returned is only valid if `checkingInits` is true, and is used for more permissive label checking for field assignments.

  Specified by:
    `constructorReturnLabel` in interface `JifContext`

### setConstructorReturnLabel

    public void setConstructorReturnLabel(Label Lr)

  Specified by:
    `setConstructorReturnLabel` in interface `JifContext`

### pushConstructorCall

    public polyglot.types.Context pushConstructorCall()

  Description copied from interface: `JifContext`
  Push a Context onto the stack for a constructor call, e.g. "super(...)" or "this(...)". Jif needs to distinguish constructor call contexts from other static contexts because the this label may appear in constructor call contexts, but not other static contexts.

  Specified by:
    `pushConstructorCall` in interface `JifContext`

### inConstructorCall

    public boolean inConstructorCall()

  Description copied from interface: `JifContext`
  Is the Context in a constructor call, e.g. "super(...)" or "this(...)"?

  Specified by:
    `inConstructorCall` in interface `JifContext`

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