//# 0 errors, 148 messages
//#
/*
    //#QueryEvents.java:1:1: class: com.dmdirc.actions.metatypes.QueryEvents
 * 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.actions.metatypes;

import com.dmdirc.Query;
import com.dmdirc.actions.interfaces.ActionMetaType;

/**
 * Defines query-related events.
 *
 * @author Chris
 */
public enum QueryEvents implements ActionMetaType {
    //#QueryEvents.java:33: method: QueryEvents[] com.dmdirc.actions.metatypes.QueryEvents.values()
    //#input(QueryEvents[] values()): $VALUES
    //#input(QueryEvents[] values()): $VALUES.length
    //#input(QueryEvents[] values()): $VALUES[0..2]
    //#output(QueryEvents[] values()): new QueryEvents[](values#1) num objects
    //#output(QueryEvents[] values()): return_value.length
    //#output(QueryEvents[] values()): return_value[0..2]
    //#output(QueryEvents[] values()): return_value
    //#new obj(QueryEvents[] values()): new QueryEvents[](values#1)
    //#pre[1] (QueryEvents[] values()): (soft) init'ed($VALUES[0..2])
    //#post(QueryEvents[] values()): return_value == &new QueryEvents[](values#1)
    //#post(QueryEvents[] values()): new QueryEvents[](values#1) num objects == 1
    //#post(QueryEvents[] values()): return_value.length == 2
    //#post(QueryEvents[] values()): return_value[0..2] == One-of{$VALUES[0..2], undefined}
    //#QueryEvents.java:33: end of method: QueryEvents[] com.dmdirc.actions.metatypes.QueryEvents.values()
    //#QueryEvents.java:33: method: QueryEvents com.dmdirc.actions.metatypes.QueryEvents.valueOf(String)
    //#input(QueryEvents valueOf(String)): __Descendant_Table[com/dmdirc/actions/metatypes/QueryEvents]
    //#input(QueryEvents valueOf(String)): __Descendant_Table[others]
    //#input(QueryEvents valueOf(String)): name
    //#output(QueryEvents valueOf(String)): return_value
    //#presumption(QueryEvents valueOf(String)): java.lang.Enum:valueOf(...).__Tag@33 == com/dmdirc/actions/metatypes/QueryEvents
    //#post(QueryEvents valueOf(String)): init'ed(return_value)
    //#QueryEvents.java:33: end of method: QueryEvents com.dmdirc.actions.metatypes.QueryEvents.valueOf(String)
    
    /** Query event type. */
    QUERY_EVENT(new String[]{"query"}, Query.class),
    //#QueryEvents.java:36: method: com.dmdirc.actions.metatypes.QueryEvents.com.dmdirc.actions.metatypes.QueryEvents__static_init
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Descendant_Table[com/dmdirc/actions/metatypes/QueryEvents]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArgNames()[Ljava/lang/String;
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArgTypes()[Ljava/lang/Class;
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArity()I
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getGroup()Ljava/lang/String;
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): com/dmdirc/actions/interfaces/ActionMetaType.__Descendant_Table[com/dmdirc/actions/metatypes/QueryEvents]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#3) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes.length
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes[0]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#6) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes.length
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes[0]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes[1]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#1) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.__Tag
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#4) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.__Tag
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents[](QueryEvents__static_init#7) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES.length
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES[0]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES[1]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#2) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames.length
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames[0]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#5) num objects
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames.length
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames[0]
    //#output(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames[1]
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#3)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#6)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#1)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#4)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents[](QueryEvents__static_init#7)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#2)
    //#new obj(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#5)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES == &new QueryEvents[](QueryEvents__static_init#7)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT == &new QueryEvents(QueryEvents__static_init#1)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES[0] == &new QueryEvents(QueryEvents__static_init#1)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG == &new QueryEvents(QueryEvents__static_init#4)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES[1] == &new QueryEvents(QueryEvents__static_init#4)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Descendant_Table[com/dmdirc/actions/metatypes/QueryEvents] == &__Dispatch_Table
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): com/dmdirc/actions/interfaces/ActionMetaType.__Descendant_Table[com/dmdirc/actions/metatypes/QueryEvents] == &__Dispatch_Table
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArgNames()[Ljava/lang/String; == &getArgNames
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArgTypes()[Ljava/lang/Class; == &getArgTypes
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getArity()I == &getArity
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): __Dispatch_Table.getGroup()Ljava/lang/String; == &getGroup
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#3) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes.length == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new Class[](QueryEvents__static_init#6) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#1) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents(QueryEvents__static_init#4) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new QueryEvents[](QueryEvents__static_init#7) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#2) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames.length == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): new String[](QueryEvents__static_init#5) num objects == 1
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes[0] == &com/dmdirc/Query.__Class_Obj
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes[0] == &com/dmdirc/Query.__Class_Obj
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes.length == 2
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): $VALUES.length == 2
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames.length == 2
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes[1] == &java.lang.String.__Class_Obj
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.__Tag == com/dmdirc/actions/metatypes/QueryEvents
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.__Tag == com/dmdirc/actions/metatypes/QueryEvents
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames == &new String[](QueryEvents__static_init#2)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argTypes == &new Class[](QueryEvents__static_init#3)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames == &new String[](QueryEvents__static_init#5)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argTypes == &new Class[](QueryEvents__static_init#6)
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT.argNames[0] == &"query"
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames[0] == &"query"
    //#post(com.dmdirc.actions.metatypes.QueryEvents__static_init): QUERY_EVENT_WITH_ARG.argNames[1] == &"message"
    //#unanalyzed(com.dmdirc.actions.metatypes.QueryEvents__static_init): Effects-of-calling:java.lang.Enum
    /** Query event with argument. */
    QUERY_EVENT_WITH_ARG(new String[]{"query", "message"}, Query.class, String.class);
    //#QueryEvents.java:38: end of method: com.dmdirc.actions.metatypes.QueryEvents.com.dmdirc.actions.metatypes.QueryEvents__static_init
    
    /** The names of the arguments for this meta type. */
    private String[] argNames;
    /** The classes of the arguments for this meta type. */
    private Class[] argTypes;
    
    /**
     * Creates a new instance of this meta-type.
     *
     * @param argNames The names of the meta-type's arguments
     * @param argTypes The types of the meta-type's arguments
     */
    QueryEvents(final String[] argNames, final Class ... argTypes) {
    //#QueryEvents.java:51: method: void com.dmdirc.actions.metatypes.QueryEvents.com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])
    //#input(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): Param_1
    //#input(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): Param_2
    //#input(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): argNames
    //#input(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): argTypes
    //#input(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): this
    //#output(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): this.argNames
    //#output(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): this.argTypes
    //#post(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): this.argNames == argNames
    //#post(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): init'ed(this.argNames)
    //#post(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): this.argTypes == argTypes
    //#post(void com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])): init'ed(this.argTypes)
        this.argNames = argNames;
        this.argTypes = argTypes;
    }
    //#QueryEvents.java:54: end of method: void com.dmdirc.actions.metatypes.QueryEvents.com.dmdirc.actions.metatypes.QueryEvents(String, int, String[], Class[])
    
    /** {@inheritDoc} */
    @Override
    public int getArity() {
        return argNames.length;
    //#QueryEvents.java:59: method: int com.dmdirc.actions.metatypes.QueryEvents.getArity()
    //#input(int getArity()): this
    //#input(int getArity()): this.argNames
    //#input(int getArity()): this.argNames.length
    //#output(int getArity()): return_value
    //#pre[2] (int getArity()): this.argNames != null
    //#pre[3] (int getArity()): this.argNames.length <= 4_294_967_295
    //#post(int getArity()): return_value == this.argNames.length
    //#post(int getArity()): return_value >= 0
    //#QueryEvents.java:59: end of method: int com.dmdirc.actions.metatypes.QueryEvents.getArity()
    }
    
    /** {@inheritDoc} */
    @Override
    public Class[] getArgTypes() {
        return argTypes;
    //#QueryEvents.java:65: method: Class[] com.dmdirc.actions.metatypes.QueryEvents.getArgTypes()
    //#input(Class[] getArgTypes()): this
    //#input(Class[] getArgTypes()): this.argTypes
    //#output(Class[] getArgTypes()): return_value
    //#pre[2] (Class[] getArgTypes()): init'ed(this.argTypes)
    //#post(Class[] getArgTypes()): return_value == this.argTypes
    //#post(Class[] getArgTypes()): init'ed(return_value)
    //#QueryEvents.java:65: end of method: Class[] com.dmdirc.actions.metatypes.QueryEvents.getArgTypes()
    }
    
    /** {@inheritDoc} */
    @Override
    public String[] getArgNames() {
        return argNames;
    //#QueryEvents.java:71: method: String[] com.dmdirc.actions.metatypes.QueryEvents.getArgNames()
    //#input(String[] getArgNames()): this
    //#input(String[] getArgNames()): this.argNames
    //#output(String[] getArgNames()): return_value
    //#pre[2] (String[] getArgNames()): init'ed(this.argNames)
    //#post(String[] getArgNames()): return_value == this.argNames
    //#post(String[] getArgNames()): init'ed(return_value)
    //#QueryEvents.java:71: end of method: String[] com.dmdirc.actions.metatypes.QueryEvents.getArgNames()
    }
    
    /** {@inheritDoc} */
    @Override
    public String getGroup() {
        return "Query Events";
    //#QueryEvents.java:77: method: String com.dmdirc.actions.metatypes.QueryEvents.getGroup()
    //#output(String getGroup()): return_value
    //#post(String getGroup()): return_value == &"Query Events"
    //#QueryEvents.java:77: end of method: String com.dmdirc.actions.metatypes.QueryEvents.getGroup()
    }    
    
}
    //#QueryEvents.java:: end of class: com.dmdirc.actions.metatypes.QueryEvents
