Raptor.ProgramParser.Statements
Class MethodDeclaration

java.lang.Object
  extended by Raptor.ProgramParser.Statements.Statements
      extended by Raptor.ProgramParser.Statements.MethodDeclaration
All Implemented Interfaces:
java.io.Serializable

public class MethodDeclaration
extends Statements

Creates a Method Declaration.
Extends abstract PTerm class.

See Also:
Serialized Form

Constructor Summary
MethodDeclaration(java.lang.String pName, java.util.Vector<java.lang.String> pTypedParams)
          Constructs a new Method Declaration
 
Method Summary
 java.lang.String display()
          Return the string which represents the method header
 boolean equals(MethodDeclaration pStatement)
          Returns true if the passed Term is equal to this Term.
 int getArity()
          Return the arity of the method
 java.util.Vector<java.lang.String> getArrayParams()
          Return the names of method's parameters which are arrays
 Formula getAutoPost()
           
 java.lang.String getAutoPre()
           
 java.lang.String getName()
          Return the method's name
 java.util.Vector<java.lang.String> getParams()
          Return the List of parameters with their types
 Formula getPost()
          Return the method's post condition
 Formula getPre()
          Return the method's precondition
 java.lang.String getRetType()
          Return the return type of the method
 PanSignature getSignature()
          Return the method's signature
 java.util.Vector<java.lang.String> getVarParams()
          Return the names of method's parameters which are variables
 boolean isIn(PanSignature pSignature)
          Returns true if this Method is in the Method list of the passed PanSignature.
 void setAutoPre(java.lang.String autoPrecondition)
           
 void setPost(Formula pPost)
          Set the method's post condition
 void setPre(Formula pPre)
          Set the method's precondition
 void setRetType(java.lang.String pRetType)
          Set the return type of the method declaration
 void setSignature(PanSignature pSignature)
          Set the method's signature
 
Methods inherited from class Raptor.ProgramParser.Statements.Statements
clashes, getLeft, getRight, setLeft, setRight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDeclaration

public MethodDeclaration(java.lang.String pName,
                         java.util.Vector<java.lang.String> pTypedParams)
Constructs a new Method Declaration

Parameters:
pName - the name of the method
pTypedParams - the parameters of the method definition with their types
Method Detail

getParams

public java.util.Vector<java.lang.String> getParams()
Return the List of parameters with their types


getName

public java.lang.String getName()
Return the method's name


getArity

public int getArity()
Return the arity of the method


setRetType

public void setRetType(java.lang.String pRetType)
Set the return type of the method declaration

Parameters:
pRetType - the return type to be set

getRetType

public java.lang.String getRetType()
Return the return type of the method


setPre

public void setPre(Formula pPre)
Set the method's precondition

Parameters:
pPre - the formula which represents the method's precondition

setPost

public void setPost(Formula pPost)
Set the method's post condition

Parameters:
pPost - the formula which represents the method's post condition

getPre

public Formula getPre()
Return the method's precondition


getPost

public Formula getPost()
Return the method's post condition


getAutoPost

public Formula getAutoPost()

getArrayParams

public java.util.Vector<java.lang.String> getArrayParams()
Return the names of method's parameters which are arrays


getVarParams

public java.util.Vector<java.lang.String> getVarParams()
Return the names of method's parameters which are variables


setSignature

public void setSignature(PanSignature pSignature)
Set the method's signature

Parameters:
pSignature - represents the method's signature

getSignature

public PanSignature getSignature()
Return the method's signature


display

public java.lang.String display()
Return the string which represents the method header

Overrides:
display in class Statements

isIn

public boolean isIn(PanSignature pSignature)
Returns true if this Method is in the Method list of the passed PanSignature.

Parameters:
pSignature - PanSignature represents the signature it is to be searched in.

equals

public boolean equals(MethodDeclaration pStatement)
Returns true if the passed Term is equal to this Term.

Parameters:
pStatement - pStatement represents the Statement it is to be compared against.

setAutoPre

public void setAutoPre(java.lang.String autoPrecondition)

getAutoPre

public java.lang.String getAutoPre()