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.label
Class AccessPath

    java.lang.Object
      jif.types.label.AccessPath

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AccessPathField, AccessPathRoot

    public abstract class AccessPath

extends java.lang.Object
implements java.io.Serializable

An AccessPath represents a final access path. A final access path is of the form "R.f1. ... .fn", where "R" is one of

- a final local variable
- the special expression "this"
- a class type

and each "fi" is a final field dereference.

AccessPaths are used in the Jif type system to represent dynamic principals and dynamic labels.

For technical reasons, there are two subclasses of AccessPath that do not directly represent final access paths. `AccessPathConstant`is used to represent label or principal expressions, such as "new label {Alice:}" or "Alice". (@link jif.types.label.AccessPathUninterpreted AccessPathUninterpreted} is used to represent non-final access paths, for example "this.m()".

See Also:
  Serialized Form

Constructor Summary
`protected` | `AccessPath(polyglot.util.Position pos)`

Method Summary
`abstract boolean` | `equals(java.lang.Object o)`
`abstract boolean` | `equivalentTo(AccessPath p, LabelEnv env)`
`java.lang.String` | `exprString()`
`abstract int` | `hashCode()`
`abstract boolean` | `isCanonical()`
`abstract boolean` | `isNeverNull()`
`abstract boolean` | `isUninterpreted()`
`abstract PathMap` | `labelcheck(JifContext A, LabelChecker lc)`
`polyglot.util.Position` | `position()`
`abstract AccessPathRoot` | `root()`
`abstract AccessPath` | `subst(AccessPathRoot r, AccessPath e)` Return the result of substituting the root r with the access path e.
`java.util.List` | `throwTypes(polyglot.types.TypeSystem ts)` Return a list of types that may be thrown as a result of the runtime evaluation of this path.
`abstract polyglot.types.Type` | `type()` The type of the access path (when the access path is regarded as an expression).
`void` | `verify(JifContext A)` Go through the path, check that all the type information is set correctly, and check that every field access is to a final field, and any local used is final

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

Constructor Detail

### AccessPath

    protected AccessPath(polyglot.util.Position pos)

Method Detail

### equals

    public abstract boolean equals(java.lang.Object o)

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

### isCanonical

    public abstract boolean isCanonical()

### isUninterpreted

    public abstract boolean isUninterpreted()

### subst

    public abstract AccessPath subst(AccessPathRoot r,
                                     AccessPath e)

  Return the result of substituting the root r with the access path e. For example, given a field access path "this.f", substituting the access path root "this" for the access path "o.g" will result in the access path "o.g.f". This method is used to instantiate procedures for calls, and labels of fields.

### type

    public abstract polyglot.types.Type type()

  The type of the access path (when the access path is regarded as an expression).

### hashCode

    public abstract int hashCode()

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

### isNeverNull

    public abstract boolean isNeverNull()

### labelcheck

    public abstract PathMap labelcheck(JifContext A,
                                       LabelChecker lc)

### root

    public abstract AccessPathRoot root()

### position

    public final polyglot.util.Position position()

### verify

    public void verify(JifContext A)
                throws polyglot.types.SemanticException

  Go through the path, check that all the type information is set correctly, and check that every field access is to a final field, and any local used is final

  Parameters:
    `A` -
  Throws:
    `polyglot.types.SemanticException`

### exprString

    public java.lang.String exprString()

### throwTypes

    public java.util.List throwTypes(polyglot.types.TypeSystem ts)

  Return a list of types that may be thrown as a result of the runtime evaluation of this path.

### equivalentTo

    public abstract boolean equivalentTo(AccessPath p,
                                         LabelEnv env)

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