package tcra.programmatic;

/**
 * MethodArgument provides a way to represent an argument to a
 * specification's method.
 */
public class MethodArgument
{
   private String          name;
   private ProgrammingType type;

   /**
    *  Class constructor specifying the name, programming type,
    *  and formal mathematical type of the argument.
    *
    *  @param name the name of the argument as would be seen
    *              in code
    *  @param type the programming type of the argument
    */
   public MethodArgument(String name,
                         ProgrammingType type)
   {
      this.name   = name;
      this.type   = type;
   } // end ctor

   /**
    * Get this argument's name.
    *
    * @return String Argument name.
    */
   public String          getName()    { return name; }

   /**
    * Get this argument's programming type. The programming type
    * is the type of the argument if it was in code.
    *
    * @return ProgrammingType Argument's source code type.
    */
   public ProgrammingType getType()    { return type; }

   public String          toString()   { return name; }
}
