edu.neu.ccs.jpf
Class JPFBase.ConstructorSignature

java.lang.Object
  extended byedu.neu.ccs.jpf.JPFBase.MemberSignature
      extended byedu.neu.ccs.jpf.JPFBase.ParametrizedSignature
          extended byedu.neu.ccs.jpf.JPFBase.ConstructorSignature
Enclosing class:
JPFBase

private static class JPFBase.ConstructorSignature
extends JPFBase.ParametrizedSignature

Encapsulates constructor signature attributes.


Field Summary
protected  int modifiers
          Modifers for this member.
protected  String name
          Name of this member.
 
Constructor Summary
JPFBase.ConstructorSignature(String s)
          Constructs a new signature object representing the given text constructor signature.
 
Method Summary
protected  void addModifier(String token)
          Adds the modifier represented by the given keyword to the list of modifiers for this method.
protected  void addParameter(String type, String name)
          Adds an parameter to this object with the given name, whose type is named by the given String.
protected  String className(Class c)
          Returns the unqualified name of the given class.
 boolean equals(Constructor c)
          Returns true if this constructor signature is correct for the given constructor.
protected  void fromString(String s)
          Parses the given text constructor signature and sets member data for this object accordingly.
 String[] getParameterNames()
          Returns an array containing the names of the parameters.
 String[] getParameterTypes()
          Returns an array containing the types of the parameters.
protected  boolean isModifier(String token)
          Returns true if the given String equals a method modifier keyword, or false otherwise.
protected  String modifierString()
          Returns a String representation of the modifiers for this member.
protected  String parameterString()
          Returns a String representation of the parameters for this object.
 String toString()
          Returns a text method signature represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modifiers

protected int modifiers
Modifers for this member.


name

protected String name
Name of this member.

Constructor Detail

JPFBase.ConstructorSignature

public JPFBase.ConstructorSignature(String s)
                             throws JPTError
Constructs a new signature object representing the given text constructor signature.

Parameters:
s - text signature for this constructor
Throws:
JPTError - if the text signature is malformed
Method Detail

fromString

protected void fromString(String s)
                   throws JPTError
Parses the given text constructor signature and sets member data for this object accordingly.

Specified by:
fromString in class JPFBase.MemberSignature
Parameters:
s - text method signature to parse
Throws:
JPTError - if the text signature is malformed

toString

public String toString()
Returns a text method signature represented by this object.


equals

public boolean equals(Constructor c)
Returns true if this constructor signature is correct for the given constructor.

Parameters:
c - constructor with which to compare

isModifier

protected boolean isModifier(String token)
Returns true if the given String equals a method modifier keyword, or false otherwise.

Overrides:
isModifier in class JPFBase.MemberSignature
Parameters:
token - possible method modifier keyword

addParameter

protected void addParameter(String type,
                            String name)
Adds an parameter to this object with the given name, whose type is named by the given String.

Parameters:
type - name of the type of the parameter
name - name of the parameter

getParameterTypes

public String[] getParameterTypes()
Returns an array containing the types of the parameters.


getParameterNames

public String[] getParameterNames()
Returns an array containing the names of the parameters.


parameterString

protected String parameterString()
Returns a String representation of the parameters for this object.


addModifier

protected 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

className

protected String className(Class c)
Returns the unqualified name of the given class.

Parameters:
c - class from which to extract name

modifierString

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