jml2b.structure.java
Class Parameters

java.lang.Object
  extended byjml2b.structure.IAParameters
      extended byjml2b.structure.java.Parameters
All Implemented Interfaces:
Linkable, java.io.Serializable

public class Parameters
extends IAParameters
implements Linkable, java.io.Serializable

Author:
A. Requet L. Burdy
See Also:
Serialized Form

Field Summary
 java.util.Vector signature
          vector containing fields corresponding to the signature
 
Fields inherited from interface jml2b.link.Linkable
STATE_LINKED, STATE_LINKED_STATEMENTS, STATE_LINKED_TYPE_CHECKED, STATE_UNLINKED
 
Constructor Summary
Parameters()
           
Parameters(java.lang.String methodDescriptor)
           
 
Method Summary
 Field getField(int i)
           
 java.util.Enumeration getParameters()
           
 java.util.Vector getSignature()
           
 Type getType(int i)
           
 boolean isCompatible(java.util.Vector types)
          return true if the parameters are compatibles with the given vector of Type.
 boolean isCompatibleWith(IJml2bConfiguration config, IAParameters params)
          return true if all the types in this are compatible with the types in params.
 boolean isSameAs(IAParameters p)
          compare the signature with the signature of the given parameters.
 void link(IJml2bConfiguration config, LinkContext lc)
           
 int linkStatements(IJml2bConfiguration config, LinkContext lc)
           
 int nparams()
           
 antlr.collections.AST parse(JmlFile jmlFile, antlr.collections.AST ast)
           
 java.lang.String toJava()
           
 java.lang.String toJavaWithParameterName()
           
 java.lang.String toString()
           
 java.lang.String toString(char separator)
           
 
Methods inherited from class jml2b.structure.IAParameters
hasSameTypes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

signature

public java.util.Vector signature
vector containing fields corresponding to the signature

Constructor Detail

Parameters

public Parameters()

Parameters

public Parameters(java.lang.String methodDescriptor)
Method Detail

parse

public antlr.collections.AST parse(JmlFile jmlFile,
                                   antlr.collections.AST ast)
                            throws Jml2bException
Throws:
Jml2bException

link

public void link(IJml2bConfiguration config,
                 LinkContext lc)
          throws Jml2bException
Specified by:
link in interface Linkable
Throws:
Jml2bException

linkStatements

public int linkStatements(IJml2bConfiguration config,
                          LinkContext lc)
                   throws Jml2bException
Specified by:
linkStatements in interface Linkable
Throws:
Jml2bException

isCompatible

public boolean isCompatible(java.util.Vector types)
                     throws Jml2bException
return true if the parameters are compatibles with the given vector of Type. (that is, the types stored in types could be used as parameters for calling the method)

Overrides:
isCompatible in class IAParameters
Throws:
Jml2bException

getType

public Type getType(int i)
Specified by:
getType in class IAParameters
Parameters:
i -
Returns:

isCompatibleWith

public boolean isCompatibleWith(IJml2bConfiguration config,
                                IAParameters params)
                         throws Jml2bException
return true if all the types in this are compatible with the types in params.

Overrides:
isCompatibleWith in class IAParameters
Throws:
Jml2bException

isSameAs

public boolean isSameAs(IAParameters p)
compare the signature with the signature of the given parameters. return true iff the signature are the same. (does not check the names of parameters for equality).

Overrides:
isSameAs in class IAParameters

getSignature

public java.util.Vector getSignature()

getField

public Field getField(int i)

nparams

public int nparams()
Specified by:
nparams in class IAParameters
Returns:

getParameters

public java.util.Enumeration getParameters()

toString

public java.lang.String toString()

toString

public java.lang.String toString(char separator)
Specified by:
toString in class IAParameters
Parameters:
separator -
Returns:

toJava

public java.lang.String toJava()

toJavaWithParameterName

public java.lang.String toJavaWithParameterName()