code: public static Object createObject(String string) {
        if (StringUtils.isNullOrBlank(string)) {
           return null;
        }
        if (ReflectionUtils.isClassName(string)) {
           try {
              Class<?> clazz = ReflectionUtils.getClassForNameQuietly(string);
              if (ReflectionUtils.isSingleton(clazz)) {
                 return ReflectionUtils.getSingletonFor(clazz);
              } else {
                 return BeanUtils.getBean(clazz);
              }
           } catch (Exception e) {
              return null;
           }
        }
        int index = string.lastIndexOf(".");
        if (index != -1) {
           String field = string.substring(string.lastIndexOf('.') + 1);
           String cStr = string.substring(0, string.lastIndexOf('.'));
           if (ReflectionUtils.isClassName(cStr)) {
              Class<?> clazz = ReflectionUtils.getClassForNameQuietly(cStr);
  
              if (Reflect.onClass(clazz).containsField(field)) {
                 try {
                    return Reflect.onClass(clazz).get(field).get();
                 } catch (ReflectionException e) {
                    //ignore this;
                 }
              }
  
              if (Reflect.onClass(clazz).containsMethod(field)) {
                 try {
                    return Reflect.onClass(clazz).invoke(field).get();
                 } catch (ReflectionException e) {
                    //ignore the error
                 }
              }
  
              try {
                 return Reflect.onClass(clazz).create(field).get();
              } catch (ReflectionException e) {
                 return null;
              }
  
           }
        }
        return null;
     }
docs: <p>Creates an object from a string. It first checks if the string is a class name and if so attempts to create an
  instance or get a singleton instance of the class. Next it checks if the string is class name and a static method
  or field name and if so invokes the static method or gets the value of the static field. </p>
  
  @param string The string containing information about the object to create
  @return An object or null if the object the string maps to cannot be determined.