/** * Get a singleton instance of this class to work with (stored statically) <br/> * <b>WARNING</b>: do not hold onto this object or cache it yourself, call this method again if you need it again * @return a singleton instance of this class */ public static ConversionUtils getInstance() { ConversionUtils instance = (instanceStorage == null ? null : instanceStorage.get()); if (instance == null) { instance = ConversionUtils.setInstance(null); } return instance; } /**
/** * Get a singleton instance of this class to work with (stored statically) <br/> * <b>WARNING</b>: do not hold onto this object or cache it yourself, call this method again if you need it again * @return a singleton instance of this class */ public static ConversionUtils getInstance() { ConversionUtils instance = (instanceStorage == null ? null : instanceStorage.get()); if (instance == null) { instance = ConversionUtils.setInstance(null); } return instance; } /**
/** * Constructor which allows adding to the initial set of converters * <br/> * <b>WARNING:</b> if you don't need this control then just use the {@link #getInstance()} method to get this * * @param converters a map of converters to add to the default set */ public ConversionUtils(Map<Class<?>, Converter<?>> converters) { // populate the converters setConverters(converters); setVariableConverters(null); ConversionUtils.setInstance(this); }
/** * Constructor which allows adding to the initial set of converters * <br/> * <b>WARNING:</b> if you don't need this control then just use the {@link #getInstance()} method to get this * * @param converters a map of converters to add to the default set */ public ConversionUtils(Map<Class<?>, Converter<?>> converters) { // populate the converters setConverters(converters); setVariableConverters(null); ConversionUtils.setInstance(this); }