public static DataDecoder create(final Class targetType) throws DataDecodeException {
Class<? extends DataDecoder> decoderType = getInstance(targetType);
if(decoderType != null) {
if(decoderType == EnumDecoder.class) {
EnumDecoder decoder = new EnumDecoder();
decoder.setEnumType(targetType);
return decoder;
} else {
return newInstance(decoderType);
}
}