|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.bean.annotations.processor.FormatterProcessor
public final class FormatterProcessor
This class is responsible for processing the @Formatter annotation.
Field Summary | |
---|---|
private static FormatterProcessor |
instance
Singleton instance. |
private static org.slf4j.Logger |
LOGGER
The class logger. |
Constructor Summary | |
---|---|
private |
FormatterProcessor()
Private constructor to ensure the existence of singleton. |
Method Summary | ||
---|---|---|
private
|
getCustomFormatter(Field field,
Formatter formatterAnnotation,
Class<T> fieldConcreteClass)
Returns a formatter identified from the formatter annotation setted on a field as a custom formatter. |
|
private
|
getDateFormatter(Field field,
Formatter formatterAnnotation,
Class<T> fieldConcreteClass)
Returns a date formatter identified from the formatter annotation setted on a field. |
|
|
getFormatter(Field field,
Class<T> fieldConcreteClass)
Return the formatter to use on a field. |
|
static FormatterProcessor |
getInstance()
The singleton instance. |
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 FormatterProcessor instance
Constructor Detail |
---|
private FormatterProcessor()
Method Detail |
---|
public static FormatterProcessor getInstance()
public <T> Formatter<T> getFormatter(Field field, Class<T> fieldConcreteClass) throws AnnotationProcessorException
T
- the type the formatter deals with.field
- the field to formatfieldConcreteClass
- the concrete class
AnnotationProcessorException
- if an error occursprivate <T> Formatter<Date> getDateFormatter(Field field, Formatter formatterAnnotation, Class<T> fieldConcreteClass) throws AnnotationProcessorException
T
- the type the formatte deals with.field
- the fieldformatterAnnotation
- the annotation setted on the field.fieldConcreteClass
- the concrete class the formatter deals with.
AnnotationProcessorException
- if an error occursprivate <T> Formatter<T> getCustomFormatter(Field field, Formatter formatterAnnotation, Class<T> fieldConcreteClass) throws AnnotationProcessorException
T
- the type the formatter deals with.field
- the field.formatterAnnotation
- the annotatin setted on the field.fieldConcreteClass
- the concrete class the formatter deals with.
AnnotationProcessorException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |