jif.types
Class Principal_c

java.lang.Object
  |
  +--polyglot.ext.jl.types.TypeObject_c
        |
        +--jif.types.Principal_c
All Implemented Interfaces:
java.lang.Cloneable, polyglot.util.Copy, Param, Principal, java.io.Serializable, polyglot.types.TypeObject
Direct Known Subclasses:
DynamicPrincipal_c, ExternalPrincipal_c, ParamPrincipal_c

public abstract class Principal_c
extends polyglot.ext.jl.types.TypeObject_c
implements Principal

An abstract implementation of the Principal interface.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
Principal_c(JifTypeSystem ts, polyglot.util.Position pos, UID uid)
           
Principal_c(JifTypeSystem ts, polyglot.util.Position pos, UID uid, PrincipalToJavaExpr toJava)
           
 
Method Summary
 boolean isCanonical()
           
abstract  boolean isRuntimeRepresentable()
           
abstract  Label labelOf()
          Gets the label of this principal.
 Principal subst(LabelSubstitution substitution)
          Accepts a LabelSubstitution and returns the result of substituting according to the given LabelSubstitution.
abstract  Principal subst(UID uid, Label L)
          Substitutes any occurences of for L.
 polyglot.ast.Expr toJava(JifToJavaRewriter rw)
           
abstract  java.lang.String translate(polyglot.types.Resolver c)
           
 UID uid()
           
 
Methods inherited from class polyglot.ext.jl.types.TypeObject_c
copy, equals, equalsImpl, position, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

Principal_c

public Principal_c(JifTypeSystem ts,
                   polyglot.util.Position pos,
                   UID uid)

Principal_c

public Principal_c(JifTypeSystem ts,
                   polyglot.util.Position pos,
                   UID uid,
                   PrincipalToJavaExpr toJava)
Method Detail

toJava

public polyglot.ast.Expr toJava(JifToJavaRewriter rw)
                         throws polyglot.types.SemanticException
Specified by:
toJava in interface Principal
polyglot.types.SemanticException

uid

public UID uid()
Specified by:
uid in interface Principal

isCanonical

public boolean isCanonical()
Specified by:
isCanonical in interface Param

subst

public Principal subst(LabelSubstitution substitution)
Description copied from interface: Principal
Accepts a LabelSubstitution and returns the result of substituting according to the given LabelSubstitution.

Specified by:
subst in interface Principal
Parameters:
substitution - the LabelSubstitution to use
Returns:
the result of the substitution

isRuntimeRepresentable

public abstract boolean isRuntimeRepresentable()
Specified by:
isRuntimeRepresentable in interface Param

subst

public abstract Principal subst(UID uid,
                                Label L)
Description copied from interface: Principal
Substitutes any occurences of for L. Refer to Andrew's thesis, Figure 5.5.

Specified by:
subst in interface Principal

labelOf

public abstract Label labelOf()
Description copied from interface: Principal
Gets the label of this principal. Refer to Andrew's thesis, Figure 5.4.

Specified by:
labelOf in interface Principal

translate

public abstract java.lang.String translate(polyglot.types.Resolver c)
Specified by:
translate in interface Principal