edu.neu.ccs.jpf
Class JPFExtras.MethodSignature

java.lang.Object
  extended byedu.neu.ccs.jpf.JPFExtras.MemberSignature
      extended byedu.neu.ccs.jpf.JPFExtras.ParametrizedSignature
          extended byedu.neu.ccs.jpf.JPFExtras.MethodSignature
Enclosing class:
JPFExtras

public static class JPFExtras.MethodSignature
extends JPFExtras.ParametrizedSignature

Encapsulates a method signature.


Field Summary
protected  String returnType
          Name of the return type for this method.
 
Fields inherited from class edu.neu.ccs.jpf.JPFExtras.ParametrizedSignature
parameterNames, parameterTypes
 
Fields inherited from class edu.neu.ccs.jpf.JPFExtras.MemberSignature
isvalid, memberName, modifiers, originalData
 
Constructor Summary
JPFExtras.MethodSignature(String s)
          Constructs a new signature object representing the given text method signature.
 
Method Summary
protected  void fromString(String s)
          Parses the given text method signature and sets member data for this object accordingly.
 boolean isMatchFor(Method m)
          Returns true if this method signature is equivalent to that of the given method.
 String toString()
          Returns the text method signature represented by this object after parsing.
 
Methods inherited from class edu.neu.ccs.jpf.JPFExtras.ParametrizedSignature
addParameter, addParameter, getParameterNames, getParameterTypes, parameterString
 
Methods inherited from class edu.neu.ccs.jpf.JPFExtras.MemberSignature
addModifier, getMemberName, getModifiers, getOriginalData, isValid, modifierString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

returnType

protected String returnType
Name of the return type for this method.

Constructor Detail

JPFExtras.MethodSignature

public JPFExtras.MethodSignature(String s)

Constructs a new signature object representing the given text method signature.

Sets the internal member data isvalid to false if the text signature is malformed. In that case the internal data cannot be trusted and the signature cannot match anything.

Parameters:
s - text signature for this method
Method Detail

fromString

protected void fromString(String s)

Parses the given text method signature and sets member data for this object accordingly.

Sets the internal member data isvalid to false if the text signature is malformed. In that case the internal data cannot be trusted and the signature cannot match anything.

Specified by:
fromString in class JPFExtras.MemberSignature
Parameters:
s - text method signature to parse

toString

public String toString()

Returns the text method signature represented by this object after parsing.

If the member data isvalid is false, the return value will be invalid.


isMatchFor

public boolean isMatchFor(Method m)

Returns true if this method signature is equivalent to that of the given method.

Automatically returns false if the member data isvalid is false.

Parameters:
m - method with which to compare