jif.types
Interface Principal

All Superinterfaces:
java.lang.Cloneable, polyglot.util.Copy, Param, java.io.Serializable, polyglot.types.TypeObject
All Known Subinterfaces:
ArgPrincipal, DynamicPrincipal, ExternalPrincipal, ParamPrincipal, UnknownPrincipal
All Known Implementing Classes:
ArgPrincipal_c, DynamicPrincipal_c, ExternalPrincipal_c, ParamPrincipal_c, Principal_c, UnknownPrincipal_c

public interface Principal
extends Param

The root interface of all kinds of Jif principals.


Method Summary
 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.
 Principal subst(UID uid, Label L)
          Substitutes any occurences of for L.
 polyglot.ast.Expr toJava(JifToJavaRewriter rw)
           
 java.lang.String translate(polyglot.types.Resolver c)
           
 UID uid()
           
 
Methods inherited from interface jif.types.Param
isCanonical, isRuntimeRepresentable
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

uid

public UID uid()

labelOf

public Label labelOf()
Gets the label of this principal. Refer to Andrew's thesis, Figure 5.4.


subst

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


subst

public Principal subst(LabelSubstitution substitution)
                throws polyglot.types.SemanticException
Accepts a LabelSubstitution and returns the result of substituting according to the given LabelSubstitution.

Parameters:
substitution - the LabelSubstitution to use
Returns:
the result of the substitution
Throws:
polyglot.types.SemanticException

translate

public java.lang.String translate(polyglot.types.Resolver c)

toJava

public polyglot.ast.Expr toJava(JifToJavaRewriter rw)
                         throws polyglot.types.SemanticException
Throws:
polyglot.types.SemanticException