jif.types
Class ArgPrincipal_c

java.lang.Object
  extended bypolyglot.ext.jl.types.TypeObject_c
      extended byjif.types.Principal_c
          extended byjif.types.DynamicPrincipal_c
              extended byjif.types.ArgPrincipal_c
All Implemented Interfaces:
ArgPrincipal, java.lang.Cloneable, polyglot.util.Copy, DynamicPrincipal, Param, Principal, java.io.Serializable, polyglot.types.TypeObject

public class ArgPrincipal_c
extends DynamicPrincipal_c
implements ArgPrincipal

See Also:
Serialized Form

Field Summary
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
ArgPrincipal_c(JifTypeSystem ts, polyglot.util.Position pos, UID uid, java.lang.String name, Label L, int index, boolean isSignature)
           
 
Method Summary
 int index()
          Indicates which method argument this ArgPrincipal represents.
 boolean isCanonical()
           
 boolean isSignature()
          Indicates if this ArgLabel is the arg label of a method signature, or of an argument of the method body we are currently in.
 Principal subst(UID uid, Label L)
          Substitutes any occurences of for L.
 java.lang.String toString()
           
 
Methods inherited from class jif.types.DynamicPrincipal_c
equalsImpl, hashCode, isRuntimeRepresentable, label, label, labelOf, name, name, subst, translate
 
Methods inherited from class jif.types.Principal_c
toJava, uid
 
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.DynamicPrincipal
label, label, name, name
 
Methods inherited from interface jif.types.Principal
labelOf, subst, toJava, translate, uid
 
Methods inherited from interface jif.types.Param
isRuntimeRepresentable
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

ArgPrincipal_c

public ArgPrincipal_c(JifTypeSystem ts,
                      polyglot.util.Position pos,
                      UID uid,
                      java.lang.String name,
                      Label L,
                      int index,
                      boolean isSignature)
Method Detail

isCanonical

public boolean isCanonical()
Specified by:
isCanonical in interface Param
Overrides:
isCanonical in class Principal_c

index

public int index()
Description copied from interface: ArgPrincipal
Indicates which method argument this ArgPrincipal represents.

Specified by:
index in interface ArgPrincipal

isSignature

public boolean isSignature()
Description copied from interface: ArgPrincipal
Indicates if this ArgLabel is the arg label of a method signature, or of an argument of the method body we are currently in. It is necessary to distinguish these kinds of ArgLabels to prevent confusion when replacing arg labels with actual arguments to method calls.

Specified by:
isSignature in interface ArgPrincipal

toString

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

subst

public 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
Overrides:
subst in class DynamicPrincipal_c