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

## jif.extension
Class CallHelper

    java.lang.Object
      jif.extension.CallHelper

    public class CallHelper

extends java.lang.Object

This is a tool to label check method calls. This class should be used by creating an instance of it, and then calling the method `checkCall(LabelChecker)`. After the call to that method, the remaining methods (which are getter methods) may be called.

Constructor Summary
`CallHelper(Label receiverLabel, polyglot.ast.Receiver receiver, polyglot.types.ReferenceType calleeContainer, JifProcedureInstance pi, java.util.List actualArgs, polyglot.util.Position position)`
`CallHelper(Label receiverLabel, polyglot.types.ReferenceType calleeContainer, JifProcedureInstance pi, java.util.List actualArgs, polyglot.util.Position position)`

Method Summary
`void` | `bindVarLabels(LabelChecker lc, VarLabel receiverVarLabel, java.util.List actualArgVarLabels, java.util.List actualParamVarLabels)` Bind the given var labels to the appropriate labels that have been calculated during the call checking.
`void` | `checkCall(LabelChecker lc, java.util.List throwTypes)` Check method calls.
`void` | `checkOverride(LabelChecker lc)` this.pi is a Jif method instance that this.overridingMethod is attempting to override.
`protected static java.util.List` | `getArgLabelsFromFormalTypes(java.util.List formalTypes, JifTypeSystem jts)`
`java.util.List` | `labelCheckedArgs()`
`static CallHelper` | `OverrideHelper(JifMethodInstance overridden, JifMethodInstance overriding, LabelChecker lc)`
`polyglot.types.Type` | `returnType()`
`PathMap` | `X()`

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

Constructor Detail

### CallHelper

    public CallHelper(Label receiverLabel,
                      polyglot.ast.Receiver receiver,
                      polyglot.types.ReferenceType calleeContainer,
                      JifProcedureInstance pi,
                      java.util.List actualArgs,
                      polyglot.util.Position position)

### CallHelper

    public CallHelper(Label receiverLabel,
                      polyglot.types.ReferenceType calleeContainer,
                      JifProcedureInstance pi,
                      java.util.List actualArgs,
                      polyglot.util.Position position)

Method Detail

### OverrideHelper

    public static CallHelper OverrideHelper(JifMethodInstance overridden,
                                            JifMethodInstance overriding,
                                            LabelChecker lc)

### returnType

    public polyglot.types.Type returnType()

### labelCheckedArgs

    public java.util.List labelCheckedArgs()

### X

    public PathMap X()

### checkCall

    public void checkCall(LabelChecker lc,
                          java.util.List throwTypes)
                   throws polyglot.types.SemanticException

  Check method calls. (Thesis, Figure 4.29)

  Throws:
    `polyglot.types.SemanticException`

### bindVarLabels

    public void bindVarLabels(LabelChecker lc,
                              VarLabel receiverVarLabel,
                              java.util.List actualArgVarLabels,
                              java.util.List actualParamVarLabels)
                       throws polyglot.types.SemanticException

  Bind the given var labels to the appropriate labels that have been calculated during the call checking.

  Parameters:
    `lc` - the LabelChecker
    `receiverVarLabel` - the VarLabel used to stand in for the label of the receiver
    `actualArgVarLabels` - a list of VarLabels that were used to stand in for the labels of the actual arguments
    `actualParamVarLabels` - a list of VarLabels that were used to stand in for the labels of the actual parameters
  Throws:
    `polyglot.types.SemanticException`

### getArgLabelsFromFormalTypes

    protected static java.util.List getArgLabelsFromFormalTypes(java.util.List formalTypes,
                                                                JifTypeSystem jts)

### checkOverride

    public void checkOverride(LabelChecker lc)
                       throws polyglot.types.SemanticException

  this.pi is a Jif method instance that this.overridingMethod is attempting to override. Previous type checks have made sure that things like abstractness, access flags, throw sets, etc. are ok. We need to check that the labels conform.

  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