/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */
package org.jfox.framework;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class ParameterPack {
    private String name;
    private Parameter param;
    private String description = "";

    public ParameterPack(String name, Parameter param) {
        if(param == null) {

        }
        this.name = name;
        this.description = getName();
        this.param = param;
    }

    public ParameterPack(String name, Parameter param, String description) {
        this.name = name;
        this.param = param;
        this.description = description;
    }

    public String getName() {
        return "set" + name.substring(0, 1).toUpperCase() + name.substring(1);
    }

    public Parameter getParameter() {
        return param;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer("PropertyParameterPack[");
        if(param != null) sb.append(param.toString());
        sb.append("]");
        return sb.toString();

    }

    public static void main(String[] args) {

    }
}

