com.twitter.common.args.parsers
Class NonParameterizedTypeParser<T>

java.lang.Object
  extended by com.twitter.common.args.parsers.NonParameterizedTypeParser<T>
Direct Known Subclasses:
BooleanParser, CharacterParser, DateParser, FileParser, InetSocketAddressParser, NumberParser, RangeParser, StringParser, UnitParser, URIParser, URLParser

public abstract class NonParameterizedTypeParser<T>
extends Object

Base class for parsers of types that are not parameterized.


Constructor Summary
NonParameterizedTypeParser()
           
 
Method Summary
abstract  T doParse(String raw)
          Performs the parsing of the raw string.
 T parse(ParserOracle parserOracle, Type type, String raw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonParameterizedTypeParser

public NonParameterizedTypeParser()
Method Detail

doParse

public abstract T doParse(String raw)
                   throws IllegalArgumentException
Performs the parsing of the raw string.

Parameters:
raw - Value to parse.
Returns:
The parsed value.
Throws:
IllegalArgumentException - If the value could not be parsed into the target type.

parse

public T parse(ParserOracle parserOracle,
               Type type,
               String raw)
        throws IllegalArgumentException
Throws:
IllegalArgumentException