edu.neu.ccs.jpf
Class JPFBase.ParametrizedSignature

java.lang.Object
  extended byedu.neu.ccs.jpf.JPFBase.MemberSignature
      extended byedu.neu.ccs.jpf.JPFBase.ParametrizedSignature
Direct Known Subclasses:
JPFBase.ConstructorSignature, JPFBase.MethodSignature
Enclosing class:
JPFBase

private abstract static class JPFBase.ParametrizedSignature
extends JPFBase.MemberSignature

Encapsulates a parametrized member signature.


Field Summary
protected  int modifiers
          Modifers for this member.
protected  String name
          Name of this member.
private  ArrayList parameterNames
          Names of parameters.
private  ArrayList parameters
          Names of the types of parameters.
 
Constructor Summary
private JPFBase.ParametrizedSignature()
           
 
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.
protected abstract  void fromString(String s)
          Parses the given text 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

private ArrayList parameters
Names of the types of parameters.


parameterNames

private ArrayList parameterNames
Names of parameters.


modifiers

protected int modifiers
Modifers for this member.


name

protected String name
Name of this member.

Constructor Detail

JPFBase.ParametrizedSignature

private JPFBase.ParametrizedSignature()
Method Detail

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.


fromString

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

Parameters:
s - text signature to parse
Throws:
JPTError - if the text signature is malformed

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

isModifier

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

Parameters:
token - possible method modifier keyword

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.