//# 0 errors, 71 messages
//#
/*
    //#StringParam.java:1:1: class: com.dmdirc.installer.cliparser.StringParam
    //#StringParam.java:1:1: method: com.dmdirc.installer.cliparser.StringParam.com.dmdirc.installer.cliparser.StringParam__static_init
 * Copyright (c) 2006-2009 Shane Mc Cormack
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.installer.cliparser;

/**
 * Command Line argument type.
 */
public class StringParam extends CLIParam {
	/** The value of this param. */
	private String myValue = "";
	
	/**
	 * Create a new StringParam.
	 *
	 * @param chr Single Character flag for this param.
	 * @param str String flag for this param.
	 * @param desc Description of this flag.
	 */
	public StringParam(final char chr, final String str, final String desc) {
		super(chr, str, desc);
    //#StringParam.java:40: method: void com.dmdirc.installer.cliparser.StringParam.com.dmdirc.installer.cliparser.StringParam(char, String, String)
    //#input(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): chr
    //#input(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): desc
    //#input(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): str
    //#input(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this
    //#output(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.charFlag
    //#output(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.description
    //#output(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.myValue
    //#output(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.stringFlag
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.charFlag == chr
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): init'ed(this.charFlag)
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.description == desc
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): init'ed(this.description)
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.myValue == &""
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): this.stringFlag == str
    //#post(void com.dmdirc.installer.cliparser.StringParam(char, String, String)): init'ed(this.stringFlag)
	}
    //#StringParam.java:41: end of method: void com.dmdirc.installer.cliparser.StringParam.com.dmdirc.installer.cliparser.StringParam(char, String, String)
	
	/**
	 * Set the value of this param to the value given by a string.
	 *
	 * @param value String taken from command line to use as value.
	 * @return true if value was valid, else false.
	 */
	public boolean setValue(final String value) {
		myValue = value;
    //#StringParam.java:50: method: bool com.dmdirc.installer.cliparser.StringParam.setValue(String)
    //#input(bool setValue(String)): this
    //#input(bool setValue(String)): value
    //#output(bool setValue(String)): return_value
    //#output(bool setValue(String)): this.myValue
    //#post(bool setValue(String)): return_value == 1
    //#post(bool setValue(String)): this.myValue == value
    //#post(bool setValue(String)): init'ed(this.myValue)
		return true;
    //#StringParam.java:51: end of method: bool com.dmdirc.installer.cliparser.StringParam.setValue(String)
	}
	
	/**
	 * Get the value of this param.
	 *
	 * @return Value of this parameter
	 */
	public String getValue() {
		return myValue;
    //#StringParam.java:60: method: String com.dmdirc.installer.cliparser.StringParam.getValue()
    //#input(String getValue()): this
    //#input(String getValue()): this.myValue
    //#output(String getValue()): return_value
    //#pre[2] (String getValue()): init'ed(this.myValue)
    //#post(String getValue()): return_value == this.myValue
    //#post(String getValue()): init'ed(return_value)
    //#StringParam.java:60: end of method: String com.dmdirc.installer.cliparser.StringParam.getValue()
	}
	
	/**
	 * Return the value of this param as a string.
	 *
	 * @return The value of this param as a string.
	 */
	public String getStringValue() {
		return getValue();
    //#StringParam.java:69: method: String com.dmdirc.installer.cliparser.StringParam.getStringValue()
    //#input(String getStringValue()): __Descendant_Table[com/dmdirc/installer/cliparser/StringParam]
    //#input(String getStringValue()): __Descendant_Table[others]
    //#input(String getStringValue()): __Dispatch_Table.getValue()Ljava/lang/String;
    //#input(String getStringValue()): this
    //#input(String getStringValue()): this.__Tag
    //#input(String getStringValue()): this.myValue
    //#output(String getStringValue()): return_value
    //#pre[2] (String getStringValue()): this.__Tag == com/dmdirc/installer/cliparser/StringParam
    //#pre[3] (String getStringValue()): init'ed(this.myValue)
    //#post(String getStringValue()): return_value == this.myValue
    //#post(String getStringValue()): init'ed(return_value)
    //#StringParam.java:69: end of method: String com.dmdirc.installer.cliparser.StringParam.getStringValue()
	}
}
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Descendant_Table[com/dmdirc/installer/cliparser/StringParam]
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getChr()C
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getDescription()Ljava/lang/String;
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getNumber()I
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getString()Ljava/lang/String;
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getStringValue()Ljava/lang/String;
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getValue()Ljava/lang/String;
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.incNumber()V
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.setValue(Ljava/lang/String;)Z
    //#output(com.dmdirc.installer.cliparser.StringParam__static_init): com/dmdirc/installer/cliparser/CLIParam.__Descendant_Table[com/dmdirc/installer/cliparser/StringParam]
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Descendant_Table[com/dmdirc/installer/cliparser/StringParam] == &__Dispatch_Table
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): com/dmdirc/installer/cliparser/CLIParam.__Descendant_Table[com/dmdirc/installer/cliparser/StringParam] == &__Dispatch_Table
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getChr()C == &com/dmdirc/installer/cliparser/CLIParam.getChr
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getDescription()Ljava/lang/String; == &com/dmdirc/installer/cliparser/CLIParam.getDescription
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getNumber()I == &com/dmdirc/installer/cliparser/CLIParam.getNumber
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getString()Ljava/lang/String; == &com/dmdirc/installer/cliparser/CLIParam.getString
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getStringValue()Ljava/lang/String; == &getStringValue
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.getValue()Ljava/lang/String; == &getValue
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.incNumber()V == &com/dmdirc/installer/cliparser/CLIParam.incNumber
    //#post(com.dmdirc.installer.cliparser.StringParam__static_init): __Dispatch_Table.setValue(Ljava/lang/String;)Z == &setValue
    //#StringParam.java:: end of method: com.dmdirc.installer.cliparser.StringParam.com.dmdirc.installer.cliparser.StringParam__static_init
    //#StringParam.java:: end of class: com.dmdirc.installer.cliparser.StringParam
