com.fuckingbrit.q3astats
Class HitParserFactory

java.lang.Object
  |
  +--com.fuckingbrit.q3astats.HitParserFactory

public abstract class HitParserFactory
extends java.lang.Object

This factory provides a way to aquire an instance of the HitParser for the current game. Example:

 HitParser hp = HitParserFactory.getHitParser("com.fuckingbrit.q3astats.urbanterror.UT2Hit");
 String where = hp.hitParse("You hit Chewy in the Left Leg.");
 System.out.println(where);
 


Will print "Left Leg". Simple.

Version:
1.0
Author:
Michael Jervis (mike@fuckingbrit.com)
See Also:
HitParser

Constructor Summary
HitParserFactory()
           
 
Method Summary
static HitParser getHitParser(java.lang.String hitClass)
          This method will fetch an instance of a class that implements the HitParser Interface, handling any exceptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HitParserFactory

public HitParserFactory()
Method Detail

getHitParser

public static HitParser getHitParser(java.lang.String hitClass)
                              throws QuakeParseException
This method will fetch an instance of a class that implements the HitParser Interface, handling any exceptions.

Parameters:
hitClass - Name of the java class used for hit parsing
Returns:
An object implementing the KillParser interface.
Throws:
QuakeParseException - When unable to find, instansiate or access the specified class.