public final class ProgramMethod extends ObserverFunction implements ProgramInLogic, IProgramMethod
| Modifier and Type | Field and Description |
|---|---|
private MethodDeclaration |
method |
private PositionInfo |
pi |
private KeYJavaType |
returnType
Return type of the method.
|
| Constructor and Description |
|---|
ProgramMethod(MethodDeclaration method,
KeYJavaType container,
KeYJavaType kjt,
PositionInfo pi,
Sort heapSort) |
ProgramMethod(MethodDeclaration method,
KeYJavaType container,
KeYJavaType kjt,
PositionInfo pi,
Sort heapSort,
int heapCount) |
| Modifier and Type | Method and Description |
|---|---|
ImmutableList<LocationVariable> |
collectParameters() |
Expression |
convertToProgram(Term t,
ExtList l) |
boolean |
equalsModRenaming(SourceElement se,
NameAbstractionTable nat)
equals modulo renaming is described in class SourceElement.
|
StatementBlock |
getBody() |
ProgramElement |
getChildAt(int i)
Returns the child at the specified index in this node's "virtual"
child array.
|
int |
getChildCount()
Returns the number of children of this node.
|
Comment[] |
getComments()
Get comments.
|
Position |
getEndPosition()
Returns the end position of the primary token of this element.
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
SourceElement |
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source.
|
java.lang.String |
getFullName() |
KeYJavaType |
getKJT()
Deprecated.
|
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
MethodDeclaration |
getMethodDeclaration() |
ImmutableArray<Modifier> |
getModifiers()
Get the modifiers.
|
java.lang.String |
getName() |
ParameterDeclaration |
getParameterDeclarationAt(int index) |
int |
getParameterDeclarationCount() |
ImmutableArray<ParameterDeclaration> |
getParameters() |
KeYJavaType |
getParameterType(int i)
returns the KeYJavaType of the i-th parameter declaration.
|
private static ImmutableArray<KeYJavaType> |
getParamTypes(MethodDeclaration md) |
PositionInfo |
getPositionInfo()
complete position information
|
ProgramElementName |
getProgramElementName() |
Position |
getRelativePosition()
Returns the relative position (number of blank heading lines and columns)
of the primary token of this element.
|
KeYJavaType |
getReturnType() |
Position |
getStartPosition()
Returns the start position of the primary token of this element.
|
Throws |
getThrown() |
java.lang.String |
getUniqueName() |
VariableSpecification |
getVariableSpecification(int index)
Returns the variablespecification of the i-th parameterdeclaration
|
boolean |
isAbstract() |
boolean |
isConstructor()
Test whether the declaration is a constructor.
|
boolean |
isFinal() |
boolean |
isImplicit() |
boolean |
isModel()
Test whether the declaration is model.
|
boolean |
isNative() |
boolean |
isPrivate()
Test whether the declaration is private.
|
boolean |
isProtected()
Test whether the declaration is protected.
|
boolean |
isPublic()
Test whether the declaration is public.
|
boolean |
isStrictFp()
Test whether the declaration is strictfp.
|
boolean |
isSynchronized() |
boolean |
isVoid() |
MatchConditions |
match(SourceData source,
MatchConditions matchCond)
matches the source "text" (@link SourceData#getSource()) against the pattern represented
by this object.
|
void |
prettyPrint(PrettyPrinter w)
Pretty print.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to perform some
action/transformation on this element
|
createName, getContainerType, getHeapCount, getNumParams, getParamType, getParamTypes, getStateCount, getType, isStaticisSkolemConstant, isUnique, proofToString, rename, toStringadditionalValidTopLevel, additionalValidTopLevel2, argSort, argSorts, sort, sortarity, bindVarsAt, isRigid, name, validTopLevel, whereToBindclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParamTypesgetContainerType, getHeapCount, getNumParams, getParamType, getStateCount, getType, isStaticargSort, argSorts, sortarity, bindVarsAt, isRigid, sort, validTopLevelisStaticprivate final MethodDeclaration method
private final KeYJavaType returnType
private final PositionInfo pi
public ProgramMethod(MethodDeclaration method, KeYJavaType container, KeYJavaType kjt, PositionInfo pi, Sort heapSort)
public ProgramMethod(MethodDeclaration method, KeYJavaType container, KeYJavaType kjt, PositionInfo pi, Sort heapSort, int heapCount)
private static ImmutableArray<KeYJavaType> getParamTypes(MethodDeclaration md)
public MethodDeclaration getMethodDeclaration()
getMethodDeclaration in interface IProgramMethodpublic KeYJavaType getParameterType(int i)
IProgramMethodgetParameterType in interface IProgramMethodi - the int specifying the parameter positionpublic StatementBlock getBody()
getBody in interface IProgramMethodpublic SourceElement getFirstElement()
SourceElementgetFirstElement in interface SourceElementSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementSourceElement.getStartPosition()public SourceElement getLastElement()
SourceElementgetLastElement in interface SourceElementSourceElement.getEndPosition()public Comment[] getComments()
ProgramElementgetComments in interface ProgramElementpublic void prettyPrint(PrettyPrinter w) throws java.io.IOException
SourceElementprettyPrint in interface SourceElementw - a pretty printer.java.io.IOException - occasionally thrown.public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic Position getStartPosition()
getFirstElement().getStartPosition in interface SourceElementpublic Position getEndPosition()
getLastElement().getEndPosition in interface SourceElementpublic Position getRelativePosition()
getFirstElement().getRelativePosition in interface SourceElementpublic PositionInfo getPositionInfo()
SourceElementgetPositionInfo in interface SourceElementpublic boolean isPrivate()
isPrivate in interface MemberDeclarationpublic boolean isProtected()
isProtected in interface MemberDeclarationpublic boolean isPublic()
isPublic in interface MemberDeclarationpublic boolean isConstructor()
IProgramMethodisConstructor in interface IProgramMethodpublic boolean isModel()
IProgramMethodisModel in interface IProgramMethodpublic boolean isStrictFp()
isStrictFp in interface MemberDeclarationpublic boolean isVoid()
isVoid in interface IProgramMethodpublic ImmutableArray<Modifier> getModifiers()
DeclarationgetModifiers in interface Declarationpublic int getChildCount()
NonTerminalProgramElementgetChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int i)
NonTerminalProgramElementgetChildAt in interface NonTerminalProgramElementi - an index into this node's "virtual" child arraypublic boolean equalsModRenaming(SourceElement se, NameAbstractionTable nat)
equalsModRenaming in interface SourceElement@Deprecated public KeYJavaType getKJT()
public KeYJavaType getReturnType()
getReturnType in interface IProgramMethodpublic Expression convertToProgram(Term t, ExtList l)
convertToProgram in interface ProgramInLogicpublic ProgramElementName getProgramElementName()
getProgramElementName in interface IProgramMethodpublic java.lang.String getUniqueName()
getUniqueName in interface IProgramMethodpublic java.lang.String getFullName()
getFullName in interface IProgramMethodpublic java.lang.String getName()
getName in interface IProgramMethodpublic boolean isAbstract()
isAbstract in interface IProgramMethodpublic boolean isImplicit()
isImplicit in interface IProgramMethodpublic boolean isNative()
isNative in interface IProgramMethodpublic boolean isFinal()
isFinal in interface IProgramMethodpublic boolean isSynchronized()
isSynchronized in interface IProgramMethodpublic Throws getThrown()
getThrown in interface IProgramMethodpublic ParameterDeclaration getParameterDeclarationAt(int index)
getParameterDeclarationAt in interface IProgramMethodpublic VariableSpecification getVariableSpecification(int index)
IProgramMethodgetVariableSpecification in interface IProgramMethodpublic int getParameterDeclarationCount()
getParameterDeclarationCount in interface IProgramMethodpublic ImmutableArray<ParameterDeclaration> getParameters()
getParameters in interface IProgramMethodpublic MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElementMatchConditions with
the found instantiations of the schemavariables. If the match
failed, null is returned instead.match in interface ProgramElementsource - the SourceData with the program element to matchmatchCond - the MatchConditions found up to this pointpublic ImmutableList<LocationVariable> collectParameters()
collectParameters in interface IProgramMethodLocationVariables passed as parameters to
this IProgramMethod.