jif.types.label
Class AccessPathField

java.lang.Object
  extended by jif.types.label.AccessPath
      extended by jif.types.label.AccessPathField
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, polyglot.util.Copy

public class AccessPathField
extends AccessPath

Represent a final access path whose last element is a field access to a final field, for example "p.f", where p is a final access path.

See Also:
AccessPath, Serialized Form

Field Summary
protected  polyglot.types.FieldInstance fi
           
protected  java.lang.String fieldName
           
protected  AccessPath path
           
 
Constructor Summary
AccessPathField(AccessPath path, polyglot.types.FieldInstance fi, java.lang.String fieldName, polyglot.util.Position pos)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean equivalentTo(AccessPath p, LabelEnv env)
           
 java.lang.String exprString()
           
 polyglot.types.FieldInstance fieldInstance()
           
 int hashCode()
           
 boolean isCanonical()
           
 boolean isNeverNull()
           
protected  boolean isTargetNeverNull()
           
 boolean isUninterpreted()
           
 PathMap labelcheck(JifContext A, LabelChecker lc)
           
 AccessPath path()
           
 AccessPathRoot root()
           
 void setIsNeverNull()
           
 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.
 java.lang.String toString()
           
 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 jif.types.label.AccessPath
copy, position
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fi

protected polyglot.types.FieldInstance fi

fieldName

protected java.lang.String fieldName

path

protected final AccessPath path
Constructor Detail

AccessPathField

public AccessPathField(AccessPath path,
                       polyglot.types.FieldInstance fi,
                       java.lang.String fieldName,
                       polyglot.util.Position pos)
Method Detail

isNeverNull

public boolean isNeverNull()
Specified by:
isNeverNull in class AccessPath

setIsNeverNull

public void setIsNeverNull()

isCanonical

public boolean isCanonical()
Specified by:
isCanonical in class AccessPath

isUninterpreted

public boolean isUninterpreted()
Specified by:
isUninterpreted in class AccessPath

subst

public AccessPath subst(AccessPathRoot r,
                        AccessPath e)
Description copied from class: AccessPath
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.

Specified by:
subst in class AccessPath

root

public final AccessPathRoot root()
Specified by:
root in class AccessPath

toString

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

exprString

public java.lang.String exprString()
Overrides:
exprString in class AccessPath

path

public AccessPath path()

fieldInstance

public polyglot.types.FieldInstance fieldInstance()

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class AccessPath

hashCode

public int hashCode()
Specified by:
hashCode in class AccessPath

type

public polyglot.types.Type type()
Description copied from class: AccessPath
The type of the access path (when the access path is regarded as an expression).

Specified by:
type in class AccessPath

labelcheck

public PathMap labelcheck(JifContext A,
                          LabelChecker lc)
Specified by:
labelcheck in class AccessPath

isTargetNeverNull

protected boolean isTargetNeverNull()

verify

public void verify(JifContext A)
            throws polyglot.types.SemanticException
Description copied from class: AccessPath
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

Overrides:
verify in class AccessPath
Throws:
polyglot.types.SemanticException

throwTypes

public java.util.List throwTypes(polyglot.types.TypeSystem ts)
Description copied from class: AccessPath
Return a list of types that may be thrown as a result of the runtime evaluation of this path.

Overrides:
throwTypes in class AccessPath

equivalentTo

public boolean equivalentTo(AccessPath p,
                            LabelEnv env)
Specified by:
equivalentTo in class AccessPath