edu.neu.ccs.jpf
Class JPFExtras.MemberSignature

java.lang.Object
  extended byedu.neu.ccs.jpf.JPFExtras.MemberSignature
Direct Known Subclasses:
JPFExtras.ParametrizedSignature
Enclosing class:
JPFExtras

public abstract static class JPFExtras.MemberSignature
extends Object

Encapsulates the member signature attributes for a class member.


Field Summary
protected  boolean isvalid
          True if the signature is valid.
protected  String memberName
          Name of this member.
protected  int modifiers
          Modifers for this member.
protected  String originalData
          The original signature data before parsing.
 
Constructor Summary
JPFExtras.MemberSignature()
           
 
Method Summary
 void addModifier(String token)
          Adds the modifier represented by the given keyword to the list of modifiers for this method.
protected abstract  void fromString(String s)
          Parses the given text signature and sets member data for this object accordingly.
 String getMemberName()
          Returns the unqualified name.
 int getModifiers()
          Returns the modifiers bit mask.
protected  String getOriginalData()
          Returns the original signature data before parsing.
 boolean isValid()
          Returns whether or not this MemberSignature is valid.
 String modifierString()
          Returns a String representation of the modifiers for this member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

originalData

protected String originalData
The original signature data before parsing.


isvalid

protected boolean isvalid
True if the signature is valid.


modifiers

protected int modifiers
Modifers for this member.


memberName

protected String memberName
Name of this member.

Constructor Detail

JPFExtras.MemberSignature

public JPFExtras.MemberSignature()
Method Detail

fromString

protected abstract void fromString(String s)

Parses the given text 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.

It is intended that this method be called in a constructor.

Parameters:
s - text signature to parse

getOriginalData

protected String getOriginalData()
Returns the original signature data before parsing.


isValid

public boolean isValid()
Returns whether or not this MemberSignature is valid.


getModifiers

public int getModifiers()
Returns the modifiers bit mask.


getMemberName

public String getMemberName()
Returns the unqualified name.


addModifier

public void addModifier(String token)

Adds the modifier represented by the given keyword to the list of modifiers for this method.

If the given text is not a modifier, no changes are made to the modifier list.

Parameters:
token - possible keyword for modifier to be added

modifierString

public String modifierString()
Returns a String representation of the modifiers for this member.