public static @Nullable <T> T getData(Transferable transferable, Class<T> dataClass) {
    try {
      final DataFlavor dataFlavor = getDataFlavor(dataClass);
      if (!transferable.isDataFlavorSupported(dataFlavor)) {
        return null;
      }
      final Object transferData = transferable.getTransferData(dataFlavor);
      if (!dataClass.isInstance(transferData)) {
        return null;
      }
      //noinspection unchecked
      return (T) transferData;
    }
    catch(IOException e) {
      return null;
    }
    catch (Exception e) {
      LOG.error(e);
      return null;
    }
  }
public static @Nullable <T> T getData(Transferable transferable, Class<T> dataClass)