List of usage examples for java.text Format getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:ca.sqlpower.dao.session.FormatConverter.java
public String convertToSimpleType(Format convertFrom, Object... additionalInfo) { if (convertFrom instanceof DecimalFormat) { DecimalFormat decimal = (DecimalFormat) convertFrom; return DecimalFormat.class.getSimpleName() + DELIMITER + decimal.toPattern(); } else if (convertFrom instanceof SimpleDateFormat) { SimpleDateFormat date = (SimpleDateFormat) convertFrom; return SimpleDateFormat.class.getSimpleName() + DELIMITER + date.toPattern(); } else {/*from w ww . j a va2s .c om*/ throw new IllegalStateException("Unknown format to convert from " + convertFrom.getClass()); } }