//# 0 errors, 20 messages
//#
/*
    //#ParserFactory.java:1:1: class: com.dmdirc.ParserFactory
    //#ParserFactory.java:1:1: method: com.dmdirc.ParserFactory.com.dmdirc.ParserFactory__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;

import com.dmdirc.parser.irc.IRCParser;
import com.dmdirc.parser.irc.MyInfo;
import com.dmdirc.parser.irc.ServerInfo;

/**
 * Provides a method to retrieve a parser.
 *
 * @since 0.6
 * @author chris
 */
public class ParserFactory {
    //#ParserFactory.java:35: method: void com.dmdirc.ParserFactory.com.dmdirc.ParserFactory()
    //#ParserFactory.java:35: end of method: void com.dmdirc.ParserFactory.com.dmdirc.ParserFactory()
    
    /**
     * Retrieves a parser instance.
     * 
     * @param myInfo The client information to use
     * @param serverInfo The server details to use
     * @return An appropriately configured parser
     */
    public IRCParser getParser(final MyInfo myInfo, final ServerInfo serverInfo) {
        return new IRCParser(myInfo, serverInfo);
    //#ParserFactory.java:45: method: IRCParser com.dmdirc.ParserFactory.getParser(MyInfo, ServerInfo)
    //#ParserFactory.java:45: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.parser.irc.IRCParser(MyInfo, ServerInfo)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.ParserFactory
    //#    method: IRCParser getParser(MyInfo, ServerInfo)
    //#    unanalyzed callee: void com.dmdirc.parser.irc.IRCParser(MyInfo, ServerInfo)
    //#input(IRCParser getParser(MyInfo, ServerInfo)): myInfo
    //#input(IRCParser getParser(MyInfo, ServerInfo)): serverInfo
    //#output(IRCParser getParser(MyInfo, ServerInfo)): new IRCParser(getParser#1) num objects
    //#output(IRCParser getParser(MyInfo, ServerInfo)): return_value
    //#new obj(IRCParser getParser(MyInfo, ServerInfo)): new IRCParser(getParser#1)
    //#post(IRCParser getParser(MyInfo, ServerInfo)): return_value == &new IRCParser(getParser#1)
    //#post(IRCParser getParser(MyInfo, ServerInfo)): new IRCParser(getParser#1) num objects == 1
    //#ParserFactory.java:45: end of method: IRCParser com.dmdirc.ParserFactory.getParser(MyInfo, ServerInfo)
    }

}
    //#output(com.dmdirc.ParserFactory__static_init): __Descendant_Table[com/dmdirc/ParserFactory]
    //#output(com.dmdirc.ParserFactory__static_init): __Dispatch_Table.getParser(Lcom/dmdirc/parser/irc/MyInfo;Lcom/dmdirc/parser/irc/ServerInfo;)Lcom/dmdirc/parser/irc/IRCParser;
    //#post(com.dmdirc.ParserFactory__static_init): __Descendant_Table[com/dmdirc/ParserFactory] == &__Dispatch_Table
    //#post(com.dmdirc.ParserFactory__static_init): __Dispatch_Table.getParser(Lcom/dmdirc/parser/irc/MyInfo;Lcom/dmdirc/parser/irc/ServerInfo;)Lcom/dmdirc/parser/irc/IRCParser; == &getParser
    //#ParserFactory.java:: end of method: com.dmdirc.ParserFactory.com.dmdirc.ParserFactory__static_init
    //#ParserFactory.java:: end of class: com.dmdirc.ParserFactory
