@Override
  public void initialize(Class<? extends W> writableClass) throws IOException {
    if (writableClass == null) {
      return;
    }
    if (writable != null) {
      Class<?> existingWritableClass = writable.getClass();
      Preconditions.checkArgument(existingWritableClass.isAssignableFrom(writableClass),
          "Existing Writable implementation '%s' is not assignable from class '%s'",
          existingWritableClass.getName(), writableClass.getName());
    }
    try {
      writable = writableClass.newInstance();
    } catch (Exception e) {
      throw new IOException(String.format("Failed to create instance of Writable type '%s'",
          writableClass.getName()), e);
    }
  }
@Override
  public void initialize(Class<? extends W> writableClass) throws IOException {
    if (writableClass == null) {
      return;
    }
    if (writable != null) {
      Class<?> existingWritableClass = writable.getClass();
      Preconditions.checkArgument(existingWritableClass.isAssignableFrom(writableClass),
          "Existing Writable implementation '%s' is not assignable from class '%s'",
          existingWritableClass.getName(), writableClass.getName());
    }
    try {
      writable = writableClass.newInstance();
    } catch (Exception e) {
      throw new IOException(String.format("Failed to create instance of Writable type '%s'",
          writableClass.getName()), e);
    }
  }
@ Override public void initialize ( Class < ? extends W > writableClass ) throws IOException { if ( writableClass == null ) { return ; } if ( writable != null ) { Class < ? > existingWritableClass = writable . getClass ( ) ; Preconditions . checkArgument ( existingWritableClass . isAssignableFrom ( writableClass ) , "Existing Writable implementation '%s' is not assignable from class '%s'" , existingWritableClass . getName ( ) , writableClass . getName ( ) ) ; } try { writable = writableClass . newInstance ( ) ; } catch ( Exception e ) { throw new IOException ( String . format ( "Failed to create instance of Writable type '%s'" , writableClass . getName ( ) ) , e ) ; } }
Default implementation tests that class of internal Writable instance, if defined, is
assignable from the given class. If so, the internal Writable instance is replaced with a new
instance of the given class. If the given class is {@code null}, nothing is done.

@see WritableConverter#initialize(java.lang.Class)
Default implementation tests that class of internal Writable instance if defined is assignable from the given class . If so the internal Writable instance is replaced with a new instance of the given class . If the given class is { @code null } nothing is done .