src/main/java/mobi/designmyapp/common/util/UtilsFactory.java
public static ImageUtils getImageUtils() {
    if (imageUtils == null) {
      try {
        Class clazz = Class.forName(IMAGE_UTILS);
        imageUtils = (ImageUtils) clazz.newInstance();
      } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
        LOGGER.warn("Cannot instanciate util: {}", e.getMessage());
        throw new IllegalStateException(e);
      }
    }
    return imageUtils;
  }
public static ImageUtils getImageUtils() {
    if (imageUtils == null) {
      try {
        Class clazz = Class.forName(IMAGE_UTILS);
        imageUtils = (ImageUtils) clazz.newInstance();
      } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
        LOGGER.warn("Cannot instanciate util: {}", e.getMessage());
        throw new IllegalStateException(e);
      }
    }
    return imageUtils;
  }
public static ImageUtils getImageUtils ( ) { if ( imageUtils == null ) { try { Class clazz = Class . forName ( IMAGE_UTILS ) ; imageUtils = ( ImageUtils ) clazz . newInstance ( ) ; } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException e ) { LOGGER . warn ( "Cannot instanciate util: {}" , e . getMessage ( ) ) ; throw new IllegalStateException ( e ) ; } } return imageUtils ; }
Retrieve ImageUtils implementation
@return ImageUtils instance
Retrieve ImageUtils implementation