Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jif.ast
Class JifInstantiator

    java.lang.Object
      jif.ast.JifInstantiator

    public class JifInstantiator

extends java.lang.Object

This class contains a number of static utility methods to help instantiate labels, principals and types. Instantiation includes:

- the substitution of actual parameters for formal parameters in parametric types;
- the substitution of receiver labels for the "this" label;
- the substitution of actual arg labels for the formal arg labels;
- the substitution of the receiver expression for dynamic labels and principals mentioning the "this" access path;
- the substitution of the actual argument expressions for dynamic labels and principals mentioning formal arguments in their access path.

Method Summary
`static Label` | `instantiate(Label L, JifContext A, AccessPath receiverPath, polyglot.types.ReferenceType receiverType, Label receiverLbl)` Perform instantiation on the label L
`static Label` | `instantiate(Label L, JifContext A, polyglot.ast.Expr receiverExpr, polyglot.types.ReferenceType receiverType, Label receiverLbl)` Perform instantiation on the label L
`static Label` | `instantiate(Label L, JifContext A, polyglot.ast.Expr receiverExpr, polyglot.types.ReferenceType receiverType, Label receiverLbl, java.util.List formalArgLabels, java.util.List actualArgLabels, java.util.List actualArgExprs, java.util.List actualParamLabels)` Perform instantiation on the label L
`static Principal` | `instantiate(Principal p, JifContext A, polyglot.ast.Expr receiverExpr, polyglot.types.ReferenceType receiverType, Label receiverLbl, java.util.List formalArgLabels, java.util.List actualArgExprs, java.util.List actualParamLabels)` Perform instantiation on the principal p
`static polyglot.types.Type` | `instantiate(polyglot.types.Type t, JifContext A, polyglot.ast.Expr receiverExpr, polyglot.types.ReferenceType receiverType, Label receiverLbl)` Perform instantiation on the type t
`static polyglot.types.Type` | `instantiate(polyglot.types.Type t, JifContext A, polyglot.ast.Expr receiverExpr, polyglot.types.ReferenceType receiverType, Label receiverLbl, java.util.List formalArgLabels, java.util.List actualArgLabels, java.util.List actualArgExprs, java.util.List actualParamLabels)` Perform instantiation on the type t

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### instantiate

    public static Label instantiate(Label L,
                                    JifContext A,
                                    polyglot.ast.Expr receiverExpr,
                                    polyglot.types.ReferenceType receiverType,
                                    Label receiverLbl)
                             throws polyglot.types.SemanticException

  Perform instantiation on the label L

  Parameters:
    `L` - the Label to substitute
    `A` - the context of the caller of the method
    `receiverExpr` - the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
  Returns:
    the instantiated Label
  Throws:
    `polyglot.types.SemanticException`

### instantiate

    public static Label instantiate(Label L,
                                    JifContext A,
                                    AccessPath receiverPath,
                                    polyglot.types.ReferenceType receiverType,
                                    Label receiverLbl)

  Perform instantiation on the label L

  Parameters:
    `L` - the Label to substitute
    `A` - the context of the caller of the method
    `receiverPath` - the access path of the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
  Returns:
    the instantiated Label

### instantiate

    public static Label instantiate(Label L,
                                    JifContext A,
                                    polyglot.ast.Expr receiverExpr,
                                    polyglot.types.ReferenceType receiverType,
                                    Label receiverLbl,
                                    java.util.List formalArgLabels,
                                    java.util.List actualArgLabels,
                                    java.util.List actualArgExprs,
                                    java.util.List actualParamLabels)
                             throws polyglot.types.SemanticException

  Perform instantiation on the label L

  Parameters:
    `L` - the Label to substitute
    `A` - the context of the caller of the method
    `receiverExpr` - the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
    `formalArgLabels` - List of ArgLabels, the labels of the formal arguments of the procedure being called
    `actualArgLabels` - List of Labels, the labels of the actuals arguments of the procedure being called
    `actualArgExprs` - List of Exprs, the actual arguments.
    `actualParamLabels` - List of Labels, the label of the evaluation of the actual parameters. These are only really needed for static methods (including constructors), where the actual parameters need to be evaluated at runtime.
  Returns:
    the instantiated Label
  Throws:
    `polyglot.types.SemanticException`

### instantiate

    public static Principal instantiate(Principal p,
                                        JifContext A,
                                        polyglot.ast.Expr receiverExpr,
                                        polyglot.types.ReferenceType receiverType,
                                        Label receiverLbl,
                                        java.util.List formalArgLabels,
                                        java.util.List actualArgExprs,
                                        java.util.List actualParamLabels)
                                 throws polyglot.types.SemanticException

  Perform instantiation on the principal p

  Parameters:
    `p` - the principal to instantiate
    `A` - the context of the caller of the method
    `receiverExpr` - the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
    `formalArgLabels` - List of ArgLabels, the labels of the formal arguments of the procedure being called
    `actualArgExprs` - List of Exprs, the actual arguments.
    `actualParamLabels` - List of Labels, the label of the evaluation of the actual parameters. These are only really needed for static methods (including constructors), where the actual parameters need to be evaluated at runtime.
  Returns:
    the instantiated principal
  Throws:
    `polyglot.types.SemanticException`

### instantiate

    public static polyglot.types.Type instantiate(polyglot.types.Type t,
                                                  JifContext A,
                                                  polyglot.ast.Expr receiverExpr,
                                                  polyglot.types.ReferenceType receiverType,
                                                  Label receiverLbl,
                                                  java.util.List formalArgLabels,
                                                  java.util.List actualArgLabels,
                                                  java.util.List actualArgExprs,
                                                  java.util.List actualParamLabels)
                                           throws polyglot.types.SemanticException

  Perform instantiation on the type t

  Parameters:
    `t` - the Type to substitute
    `A` - the context of the caller of the method
    `receiverExpr` - the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
    `formalArgLabels` - List of ArgLabels, the labels of the formal arguments of the procedure being called
    `actualArgLabels` - List of Labels, the labels of the actuals arguments of the procedure being called
    `actualArgExprs` - List of Exprs, the actual arguments.
    `actualParamLabels` - List of Labels, the label of the evaluation of the actual parameters. These are only really needed for static methods (including constructors), where the actual parameters need to be evaluated at runtime.
  Returns:
    the instantiated type
  Throws:
    `polyglot.types.SemanticException`

### instantiate

    public static polyglot.types.Type instantiate(polyglot.types.Type t,
                                                  JifContext A,
                                                  polyglot.ast.Expr receiverExpr,
                                                  polyglot.types.ReferenceType receiverType,
                                                  Label receiverLbl)
                                           throws polyglot.types.SemanticException

  Perform instantiation on the type t

  Parameters:
    `t` - the Type to substitute
    `A` - the context of the caller of the method
    `receiverExpr` - the receiver expression, e.g., "e" in "e.m()".
    `receiverType` - the type of the receiver
    `receiverLbl` - the label of the receiver expression
  Returns:
    the instantiated type
  Throws:
    `polyglot.types.SemanticException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD