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