|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectolg.csv.bean.annotations.processor.ParserProcessor
public final class ParserProcessor
This class is responsible for processing the @Parser annotation.
| Field Summary | |
|---|---|
private static ParserProcessor |
instance
The Singleton instance. |
private static org.slf4j.Logger |
LOGGER
The class logger. |
| Constructor Summary | |
|---|---|
private |
ParserProcessor()
Private constructor to ensure the existence of singleton. |
| Method Summary | ||
|---|---|---|
private
|
getCustomParser(Field field,
Parser parserAnnotation,
Class<T> fieldConcreteClass)
Returns a parser identified from the parser annotation setted on a field as a custom parser. |
|
private
|
getDateParser(Field field,
Parser parserAnnotation,
Class<T> fieldConcreteClass)
Returns a date parser identified from the parser annotation setted on a field. |
|
static ParserProcessor |
getInstance()
The singleton instance. |
|
|
getParser(Field field,
Class<T> fieldConcreteClass)
Return the parser to use on a field. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.slf4j.Logger LOGGER
private static ParserProcessor instance
| Constructor Detail |
|---|
private ParserProcessor()
| Method Detail |
|---|
public static ParserProcessor getInstance()
public <T> AbstractParser<T> getParser(Field field,
Class<T> fieldConcreteClass)
throws AnnotationProcessorException
T - the type the parser must returnfield - the fieldfieldConcreteClass - the concrete class from which instanciate the field values.
AnnotationProcessorException - if an error occurs during annotation reading or if no parser
has been found.AbstractParser.identifyDefaultParser(Class)
private <T> AbstractParser<Date> getDateParser(Field field,
Parser parserAnnotation,
Class<T> fieldConcreteClass)
throws AnnotationProcessorException
T - the type the parser must returnfield - the field.parserAnnotation - the annotation setted on the fieldfieldConcreteClass - the concrete class from which instanciate the field values.
AnnotationProcessorException - if an error occurs
private <T> AbstractParser<T> getCustomParser(Field field,
Parser parserAnnotation,
Class<T> fieldConcreteClass)
throws AnnotationProcessorException
T - the type the parser must returnfield - the fieldparserAnnotation - the annotation setted on the field.fieldConcreteClass - the concrete class from which instanciate the field values.
AnnotationProcessorException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||