|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjif.extension.CallHelper
public class CallHelper
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,
boolean targetMayBeNull)
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)
|
Label |
instantiate(JifContext A,
Label L)
|
Principal |
instantiate(JifContext A,
Principal p)
replaces any signature ArgLabels in p with the appropriate label, and replaces any signature ArgPrincipal with the appropriate prinicipal. |
polyglot.types.Type |
instantiate(JifContext A,
polyglot.types.Type t)
|
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 |
---|
public CallHelper(Label receiverLabel, polyglot.ast.Receiver receiver, polyglot.types.ReferenceType calleeContainer, JifProcedureInstance pi, java.util.List actualArgs, polyglot.util.Position position)
public CallHelper(Label receiverLabel, polyglot.types.ReferenceType calleeContainer, JifProcedureInstance pi, java.util.List actualArgs, polyglot.util.Position position)
Method Detail |
---|
public static CallHelper OverrideHelper(JifMethodInstance overridden, JifMethodInstance overriding, LabelChecker lc)
public polyglot.types.Type returnType()
public java.util.List labelCheckedArgs()
public PathMap X()
public void checkCall(LabelChecker lc, java.util.List throwTypes, boolean targetMayBeNull) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public void bindVarLabels(LabelChecker lc, VarLabel receiverVarLabel, java.util.List actualArgVarLabels, java.util.List actualParamVarLabels) throws polyglot.types.SemanticException
lc
- the LabelCheckerreceiverVarLabel
- the VarLabel used to stand in for the label of
the receiveractualArgVarLabels
- a list of VarLabels that were used to stand in
for the labels of the actual argumentsactualParamVarLabels
- a list of VarLabels that were used to stand
in for the labels of the actual parameters
polyglot.types.SemanticException
protected static java.util.List getArgLabelsFromFormalTypes(java.util.List formalTypes, JifTypeSystem jts)
public Label instantiate(JifContext A, Label L) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public Principal instantiate(JifContext A, Principal p) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public polyglot.types.Type instantiate(JifContext A, polyglot.types.Type t) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public void checkOverride(LabelChecker lc) throws polyglot.types.SemanticException
polyglot.types.SemanticException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |