olg.csv.bean.parser.impl
Class ConstructorParser<T>

Package class diagram package ConstructorParser
java.lang.Object
  extended by olg.csv.bean.parser.AbstractParser<T>
      extended by olg.csv.bean.parser.impl.ConstructorParser<T>
Type Parameters:
T - the parser target type

public final class ConstructorParser<T>
extends AbstractParser<T>

Parser Use a constructor with string argument to parse a string.


Field Summary
private  Constructor<T> constructeur
          The constructor to use.
 
Constructor Summary
ConstructorParser(Class<T> clazz)
          Returns the Constructor for the given class which have a single String argument.
 
Method Summary
 T parse(String str)
          Converts a string into a new instance of .
 
Methods inherited from class olg.csv.bean.parser.AbstractParser
getCharacterParser, getConstructorParser, getDateParser, getEnumParser, identifyDefaultParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constructeur

private Constructor<T> constructeur
The constructor to use.

Constructor Detail

ConstructorParser

public ConstructorParser(Class<T> clazz)
                  throws NoSuchMethodException
Returns the Constructor for the given class which have a single String argument.

Parameters:
clazz - the parser target class
Throws:
NoSuchMethodException - if no such constructor exists
Method Detail

parse

public T parse(String str)
Description copied from class: AbstractParser
Converts a string into a new instance of .

Specified by:
parse in class AbstractParser<T>
Parameters:
str - the string.
Returns:
the new instance of .


Copyright © 2014. All Rights Reserved.