//# 0 errors, 35 messages
//#
/*
    //#BeepCommand.java:1:1: class: com.dmdirc.addons.audio.BeepCommand
    //#BeepCommand.java:1:1: method: com.dmdirc.addons.audio.BeepCommand.com.dmdirc.addons.audio.BeepCommand__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.audio;

import com.dmdirc.commandparser.CommandArguments;
import com.dmdirc.commandparser.CommandManager;
import com.dmdirc.commandparser.commands.GlobalCommand;
import com.dmdirc.ui.interfaces.InputWindow;

import java.awt.Toolkit;

/**
 * The Beep Command emits a beep
 *
 * @author Shane "Dataforce" Mc Cormack
 */
public final class BeepCommand extends GlobalCommand {

	/**
	 * Creates a new instance of BeepCommand.
	 */
	public BeepCommand() {
		super();
    //#BeepCommand.java:43: method: void com.dmdirc.addons.audio.BeepCommand.com.dmdirc.addons.audio.BeepCommand()
    //#BeepCommand.java:43: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.commands.GlobalCommand()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.audio.BeepCommand
    //#    method: void com.dmdirc.addons.audio.BeepCommand()
    //#    unanalyzed callee: void com.dmdirc.commandparser.commands.GlobalCommand()
    //#input(void com.dmdirc.addons.audio.BeepCommand()): this
		CommandManager.registerCommand(this);
    //#BeepCommand.java:44: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:registerCommand(Command)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.audio.BeepCommand
    //#    method: void com.dmdirc.addons.audio.BeepCommand()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:registerCommand(Command)
	}
    //#BeepCommand.java:45: end of method: void com.dmdirc.addons.audio.BeepCommand.com.dmdirc.addons.audio.BeepCommand()
		
	/** {@inheritDoc} */
    @Override
	public void execute(final InputWindow origin, final boolean isSilent,
            final CommandArguments args) {
		Toolkit.getDefaultToolkit().beep();
    //#BeepCommand.java:51: method: void com.dmdirc.addons.audio.BeepCommand.execute(InputWindow, bool, CommandArguments)
    //#presumption(void execute(InputWindow, bool, CommandArguments)): java.awt.Toolkit:getDefaultToolkit(...)@51 != null
	}
    //#BeepCommand.java:52: end of method: void com.dmdirc.addons.audio.BeepCommand.execute(InputWindow, bool, CommandArguments)

	/**
	 * Returns this command's name.
	 *
	 * @return The name of this command
	 */
    @Override
	public String getName() { return "beep"; }
    //#BeepCommand.java:60: method: String com.dmdirc.addons.audio.BeepCommand.getName()
    //#output(String getName()): return_value
    //#post(String getName()): return_value == &"beep"
    //#BeepCommand.java:60: end of method: String com.dmdirc.addons.audio.BeepCommand.getName()
	
	/**
	 * Returns whether or not this command should be shown in help messages.
	 *
	 * @return True iff the command should be shown, false otherwise
	 */
    @Override
	public boolean showInHelp() { return true; }
    //#BeepCommand.java:68: method: bool com.dmdirc.addons.audio.BeepCommand.showInHelp()
    //#output(bool showInHelp()): return_value
    //#post(bool showInHelp()): return_value == 1
    //#BeepCommand.java:68: end of method: bool com.dmdirc.addons.audio.BeepCommand.showInHelp()
	
	/**
	 * Returns a string representing the help message for this command.
	 *
	 * @return the help message for this command
	 */
    @Override
	public String getHelp() { return this.getName(); }
    //#BeepCommand.java:76: method: String com.dmdirc.addons.audio.BeepCommand.getHelp()
    //#input(String getHelp()): this
    //#output(String getHelp()): return_value
    //#post(String getHelp()): return_value == &"beep"
    //#BeepCommand.java:76: end of method: String com.dmdirc.addons.audio.BeepCommand.getHelp()
}

    //#output(com.dmdirc.addons.audio.BeepCommand__static_init): __Descendant_Table[com/dmdirc/addons/audio/BeepCommand]
    //#output(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.execute(Lcom/dmdirc/ui/interfaces/InputWindow;ZLcom/dmdirc/commandparser/CommandArguments;)V
    //#output(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.getHelp()Ljava/lang/String;
    //#output(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.showInHelp()Z
    //#post(com.dmdirc.addons.audio.BeepCommand__static_init): __Descendant_Table[com/dmdirc/addons/audio/BeepCommand] == &__Dispatch_Table
    //#post(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.execute(Lcom/dmdirc/ui/interfaces/InputWindow;ZLcom/dmdirc/commandparser/CommandArguments;)V == &execute
    //#post(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.getHelp()Ljava/lang/String; == &getHelp
    //#post(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(com.dmdirc.addons.audio.BeepCommand__static_init): __Dispatch_Table.showInHelp()Z == &showInHelp
    //#BeepCommand.java:: end of method: com.dmdirc.addons.audio.BeepCommand.com.dmdirc.addons.audio.BeepCommand__static_init
    //#BeepCommand.java:: end of class: com.dmdirc.addons.audio.BeepCommand
