use of org.simpleflatmapper.map.property.DefaultDateFormatProperty in project SimpleFlatMapper by arnaudroger.
the class CsvColumnDefinition method dateFormats.
public String[] dateFormats() {
DateFormatProperty[] prop = lookForAll(DateFormatProperty.class);
String[] patterns = new String[prop.length];
for (int i = 0; i < prop.length; i++) {
patterns[i] = prop[i].get();
}
if (patterns.length == 0) {
DefaultDateFormatProperty defaultDateFormatProperty = lookFor(DefaultDateFormatProperty.class);
if (defaultDateFormatProperty == null) {
throw new IllegalStateException("No date format specified");
}
return new String[] { defaultDateFormatProperty.get() };
}
return patterns;
}
Aggregations