|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--polyglot.ext.jl.types.TypeObject_c | +--jif.types.Label_c | +--jif.types.VarLabel_c
An implementation of the VarLabel
interface.
Field Summary |
Fields inherited from class polyglot.ext.jl.types.TypeObject_c |
position, ts |
Constructor Summary | |
protected |
VarLabel_c()
|
|
VarLabel_c(JifTypeSystem ts,
polyglot.util.Position pos,
UID uid)
|
Method Summary | |
Label |
bound(VarMap ub,
java.util.Set visited)
Gets the upper bound of this label. |
java.lang.String |
componentString()
|
boolean |
equalsImpl(polyglot.types.TypeObject o)
|
int |
hashCode()
|
boolean |
isCanonical()
By default labels are canonical. |
boolean |
isComparable()
Is this label comparable to other labels? |
boolean |
isCovariant()
Is this label covariant? |
boolean |
isRuntimeRepresentable()
|
Label |
labelOf()
Gets labelOf this label. |
boolean |
leq_(Label jc,
LabelEnv env)
Implementation of leq, should only be called by JifTypeSystem |
Label |
meet_(Label L,
PrincipalHierarchy ph)
Implementation of the meet operation, should only be called by JifTypeSystem |
Label |
subst(UID uid,
Label L)
Substitutes any occurences of |
void |
translate(polyglot.types.Resolver c,
polyglot.util.CodeWriter w)
|
UID |
uid()
|
VarLabel |
uid(UID uid)
|
java.util.Collection |
variables()
The collection of variables contained by this label (or any of its components). |
Methods inherited from class jif.types.Label_c |
components, description, description, fold, hasVariables, isBottom, isEnumerable, isInvariant, isMeetable, isSingleton, isTop, join, join, leq_, meet, meet, minus, simplify, singletonComponent, subst, toJava, toString |
Methods inherited from class polyglot.ext.jl.types.TypeObject_c |
copy, equals, position, typeSystem |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jif.types.Label |
components, description, description, fold, hasVariables, isBottom, isEnumerable, isInvariant, isMeetable, isSingleton, isTop, join, join, leq_, meet, meet, minus, simplify, singletonComponent, subst, toJava |
Methods inherited from interface polyglot.types.TypeObject |
position, typeSystem |
Methods inherited from interface polyglot.util.Copy |
copy |
Constructor Detail |
protected VarLabel_c()
public VarLabel_c(JifTypeSystem ts, polyglot.util.Position pos, UID uid)
Method Detail |
public boolean isComparable()
Label
For example, an UnknownLabel is not comparable to others, neither is a VarLabel. Most other labels are.
isComparable
in interface Label
public boolean isCanonical()
Label_c
isCanonical
in interface Param
isCanonical
in class Label_c
public boolean isRuntimeRepresentable()
isRuntimeRepresentable
in interface Param
isRuntimeRepresentable
in class Label_c
public VarLabel uid(UID uid)
uid
in interface VarLabel
public UID uid()
uid
in interface VarLabel
public java.lang.String componentString()
componentString
in interface Label
componentString
in class Label_c
public java.util.Collection variables()
Label
variables
in interface Label
variables
in class Label_c
public Label bound(VarMap ub, java.util.Set visited)
Label
bound
in interface Label
bound
in class Label_c
ub
- the upper bound map for variable labelsvisited
- the set of UIDs visited.
if the upper bound is <dynamic uid...>,
visited
,
visited
. public boolean equalsImpl(polyglot.types.TypeObject o)
equalsImpl
in interface polyglot.types.TypeObject
equalsImpl
in class polyglot.ext.jl.types.TypeObject_c
public int hashCode()
hashCode
in class java.lang.Object
public Label labelOf()
Label
labelOf
in interface Label
labelOf
in class Label_c
public Label subst(UID uid, Label L)
Label
subst
in interface Label
subst
in class Label_c
public boolean isCovariant()
Label
isCovariant
in interface Label
isCovariant
in class Label_c
public Label meet_(Label L, PrincipalHierarchy ph)
Label
meet_
in interface Label
meet_
in class Label_c
L
- label to meet with.ph
- the principal hierarchy in which to perform the meet. This
param may be null, in which case perform all meets possible that
are indpependent of the principal hierarchy.public boolean leq_(Label jc, LabelEnv env)
Label
leq_
in interface Label
leq_
in class Label_c
jc
- the label to determine if this label is leq to.public void translate(polyglot.types.Resolver c, polyglot.util.CodeWriter w)
translate
in interface Label
translate
in class Label_c
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |