public class AccessPathConstant extends AccessPathRoot
int{*lb} m(label{} lb);
and a call site
m(new label{Alice:});
the type system needs to be precise enough to realize that the method call
returns an int with label {Alice:}. This is achieved through the use of
AccessPathConstants.| Constructor and Description |
|---|
AccessPathConstant(Label label,
polyglot.types.Type type,
polyglot.util.Position pos) |
AccessPathConstant(Principal principal,
polyglot.types.Type type,
polyglot.util.Position pos) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
constantValue() |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isCanonical() |
boolean |
isLabelConstant() |
boolean |
isNeverNull() |
boolean |
isPrincipalConstant() |
AccessPath |
subst(AccessPathRoot r,
AccessPath e)
Return the result of substituting the root r with the access path
e.
|
java.lang.String |
toString() |
polyglot.types.Type |
type()
The type of the access path (when the access path is regarded
as an expression).
|
equivalentTo, isUninterpreted, labelcheck, rootcopy, exprString, position, throwTypes, verifypublic AccessPathConstant(Label label, polyglot.types.Type type, polyglot.util.Position pos)
public AccessPathConstant(Principal principal, polyglot.types.Type type, polyglot.util.Position pos)
public java.lang.Object constantValue()
public boolean isLabelConstant()
public boolean isNeverNull()
isNeverNull in class AccessPathpublic boolean isPrincipalConstant()
public boolean isCanonical()
isCanonical in class AccessPathpublic AccessPath subst(AccessPathRoot r, AccessPath e)
AccessPathsubst in class AccessPathpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class AccessPathpublic int hashCode()
hashCode in class AccessPathpublic polyglot.types.Type type()
AccessPathtype in class AccessPath