//# 0 errors, 49 messages
//#
/*
    //#Substitution.java:1:1: class: com.dmdirc.addons.ui_swing.components.substitutions.Substitution
    //#Substitution.java:1:1: method: com.dmdirc.addons.ui_swing.components.substitutions.Substitution.com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * 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.addons.ui_swing.components.substitutions;

/**
 * Wrapper for action substitutions.
 */
public final class Substitution {

    /** Substitution name. */
    private final String name;
    /** Subsitution value. */
    private final String value;

    /** 
     * Creates a new instance of Substitution. 
     *
     * @param name Name of the substitution
     * @param value Value of the substitution
     */
    public Substitution(final String name, final String value) {
    //#Substitution.java:41: method: void com.dmdirc.addons.ui_swing.components.substitutions.Substitution.com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)
    //#input(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): "$"._tainted
    //#input(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): name
    //#input(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): this
    //#input(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): value
    //#input(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): value._tainted
    //#output(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): java.lang.StringBuilder:toString(...)._tainted
    //#output(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): this.name
    //#output(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): this.value
    //#new obj(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): java.lang.StringBuilder:toString(...)
    //#post(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): java.lang.StringBuilder:toString(...)._tainted == value._tainted
    //#post(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): this.name == name
    //#post(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): init'ed(this.name)
    //#post(void com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)): this.value == &java.lang.StringBuilder:toString(...)
        this.name = name;
        this.value = "$" + value;
    }
    //#Substitution.java:44: end of method: void com.dmdirc.addons.ui_swing.components.substitutions.Substitution.com.dmdirc.addons.ui_swing.components.substitutions.Substitution(String, String)

    /**
     * Returns the name of this substitution.
     *
     * @return Substitution name   
     */
    public String getName() {
        return name;
    //#Substitution.java:52: method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.getName()
    //#input(String getName()): this
    //#input(String getName()): this.name
    //#output(String getName()): return_value
    //#post(String getName()): return_value == this.name
    //#post(String getName()): init'ed(return_value)
    //#Substitution.java:52: end of method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.getName()
    }

    /**
     * Returns the value of this substitution.
     * 
     * @return Substitution value
     */
    public String getValue() {
        return value;
    //#Substitution.java:61: method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.getValue()
    //#input(String getValue()): this
    //#input(String getValue()): this.value
    //#output(String getValue()): return_value
    //#post(String getValue()): return_value == this.value
    //#post(String getValue()): init'ed(return_value)
    //#Substitution.java:61: end of method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.getValue()
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
        return value;
    //#Substitution.java:67: method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.toString()
    //#input(String toString()): this
    //#input(String toString()): this.value
    //#output(String toString()): return_value
    //#post(String toString()): return_value == this.value
    //#post(String toString()): init'ed(return_value)
    //#Substitution.java:67: end of method: String com.dmdirc.addons.ui_swing.components.substitutions.Substitution.toString()
    }
}
    //#output(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/substitutions/Substitution]
    //#output(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.getValue()Ljava/lang/String;
    //#output(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#post(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/substitutions/Substitution] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.getValue()Ljava/lang/String; == &getValue
    //#post(com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#Substitution.java:: end of method: com.dmdirc.addons.ui_swing.components.substitutions.Substitution.com.dmdirc.addons.ui_swing.components.substitutions.Substitution__static_init
    //#Substitution.java:: end of class: com.dmdirc.addons.ui_swing.components.substitutions.Substitution
