'Factory method to create parameter of correct type'

@classmethod
def build(cls, tool, param):

    param_name = cls.parse_name(param)
    param_type = param.get('type')
    if (not param_type):
        raise ValueError(("Tool    parameter    '%s'    requires    a    'type'" % param_name))
    elif (param_type not in parameter_types):
        raise ValueError(("Tool    parameter    '%s'    uses    an    unknown    type    '%s'" % (param_name, param_type)))
    else:
        return parameter_types[param_type](tool, param)
