Example #1
0
  public static <T> T coerce(Class<T> clz, Object value) {
    if (value != null) {
      if (clz == value.getClass()) {
        return (T) value;
      }
    }

    return coerce(TypeType.getType(clz), clz, value);
  }
Example #2
0
  public static <T> T coerceWithFlag(Class<T> clz, boolean[] flag, Object value) {

    return coerceWithFlag(TypeType.getType(clz), clz, flag, value);
  }