code: public static Object castToType(Object object, Class type) throws Throwable {
              return DefaultTypeTransformation.castToType(object, type);
      }
docs: Provides a hook for type casting of the given object to the required type
  
  @param type   of object to convert the given object to
  @param object the object to be converted
  @return the original object or a new converted value
  @throws Throwable if the type casting fails