hudson.plugins.testlink.parser
Class Parser<T>

java.lang.Object
  extended by hudson.plugins.testlink.parser.Parser<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JUnitParser, TAPParser, TestNGParser

public abstract class Parser<T>
extends java.lang.Object
implements java.io.Serializable

An abstract parser.

Since:
2.0
Author:
Bruno P. Kinoshita - http://www.kinoshita.eti.br
See Also:
Serialized Form

Constructor Summary
Parser()
           
 
Method Summary
abstract  java.lang.String getName()
          Retrives the name of the parser.
 T parse(java.io.File file)
          Parses the content of the file.
abstract  T parse(java.io.InputStream inputStream)
          Parses the content of an input stream and returns a different object depending on the type of the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

getName

public abstract java.lang.String getName()
Retrives the name of the parser.

Returns:
the name of the parser.

parse

public abstract T parse(java.io.InputStream inputStream)
                 throws ParserException
Parses the content of an input stream and returns a different object depending on the type of the parser.

Parameters:
inputStream - the input stream.
Returns:
Resulting object.
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
ParserException

parse

public T parse(java.io.File file)
        throws ParserException
Parses the content of the file. This method only creates an input stream and then calls the parse(InputStream) method.

Parameters:
file - the file.
Returns:
Resulting object.
Throws:
java.lang.Exception
ParserException


Copyright © 2010-2011 the Jenkins TestLink plug-in team-2011 Jenkins. All Rights Reserved.